Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output that renders in VSCode is not rendered in this debug CLI #3

Open
mcasperson opened this issue Sep 3, 2024 · 0 comments
Open

Comments

@mcasperson
Copy link

I launch the CLI with:

$ gh debug-cli --log-level TRACE --token ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I then issue a prompt like hi, which returns a bunch of text. However, nothing is displayed by the CLI - I can only see the text as trace messages:

Setting url to http://localhost:7071/api/form_handler

Start typing to chat with your assistant...
sparklyunicorn: hi
Raw Response
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Cache-Control: no-cache
Content-Type: text/event-stream
Date: Tue, 03 Sep 2024 07:38:00 GMT
Server: Kestrel

2900
data: {"choices": [{"index": 0, "delta": {"content": "I am an AI assistant that can help you with your Octopus Deploy queries. I can answer questions about your Octopus Deploy spaces, projects, environments, deployments, and more.\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "Here are some sample queries you can ask:\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show me the dashboard for the space \"Simple\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show me the project dashboard for \"Deploy Web App Container\" in the space \"Simple\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show me the runbook dashboard for \"My Runbook\" in the project \"Deploy Web App Container\" in the space \"Simple\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show me the task summary for release \"1.4.3\" of the project \"Deploy Web App Container\" in the \"Development\" environment in the space \"Simple\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app List the projects in the space \"Simple\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app What do the deployment steps in the \"Deploy Web App Container\" project in the \"Simple\" space do?\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show me the status of the latest deployment for the project \"Deploy Web App Container\" in the \"Development\" environment in the \"Simple\" space\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show me any non-successful deployments for the \"Deploy Web App Container\" project in the space \"Simple\" for the \"Development\" environment in a markdown table. If all deployments are successful, say so.\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Summarize the deployment logs for the latest deployment for the project \"Deploy Web App Container\" in the \"Development\" environment in the space called \"Simple\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app List any URLs printed in the deployment logs for the latest deployment for the project \"Deploy Web App Container\" in the \"Development\" environment in the space called \"Simple\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app How do I enable server side apply?\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app The status \"Success\" is represented with the \ud83d\udfe2 character. The status \"Executing\" is represented by the \ud83d\udd35 character. The status \"In Progress\" is represented by the \u26aa character. Other statuses are represented with the \ud83d\udd34 character. Show the release version, release notes, and status of the last 5 deployments for the project \"Deploy Web App Container\" in the \"Development\" environment in the \"Simple\" space in a markdown table.\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "You can execute and monitor runbooks with prompts like these:\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Run the runbook \"My Runbook\" in the project \"Deploy Web App Container\" in the space \"Simple\" in the \"Development\" environment\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Summarize the execution logs of the runbook \"My Runbook\" in the project \"Deploy Web App Container\" in the space \"Simple\" in the \"Development\" environment\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "You can create and deploy a release with prompts like these:\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Create a release in the project \"Deploy Web App Container\" with version \"1.0.12-hf\" and channel \"Hotfix in the space \"Simple\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Create a release in the project \"Deploy Web App Container\" in the space \"Simple\" and deploy to the \"Development\" environment\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Deploy release version \"1.0.1\" of project \"Deploy Web App Container\" in the space \"Simple\" to the \"Development\" environment\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Deploy release version \"2.0.8\" of project \"Deploy Web App Container\" in the space \"Simple\" to the environment \"Development\" for tenant \"Contoso\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "You can cancel a deployment, runbook or other task with prompts like these:\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Cancel the latest deployment for the project \"Deploy Web App Container\" to the \"Development\" environment\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Cancel the runbook run \"My Runbook\" in the project \"Deploy Web App Container\" in the space \"Simple\" in the \"Development\" environment\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Cancel task \"ServerTasks-58479\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "You can approve or reject manual interventions in a deployment with prompts like these:\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Approve release \"0.81.5\" in \"Development\" for the project \"Deploy Web App Container\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Reject release \"1.6.19\" in the \"Development\" environment for the project \"Deploy Web App Container\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "By setting default values for the space, project, environment, and other entities, you can omit them from your queries.\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "This way, you can write prompts without specifying the space, project, environment, runbook, or tenant each time.\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "You can also set defaults for GitHub options like owner, repository and workflow.\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Set the default space to \"Simple\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Set the default project to \"Deploy Web App Container\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Set the default environment to \"Development\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Set the default tenant to \"Contoso\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Set the default runbook to \"My Runbook\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Set the default owner to \"my_organisation\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Set the default repository to \"my_repository\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Set the default workflow to \"build.yaml\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Remove default values\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show all the default values\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show the default space\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show the default project\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show the default environment\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show the default tenant\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show the default runbook\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show the default owner\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show the default repository\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Show the default workflow\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "Default values can be loaded and saved as profiles. This allows you to switch between sets of default values.\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "Saving a profile saves the current default values. Loading a profile replaces the current default values.\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Save the profile \"MyValues\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app Load the profile \"MyValues\"\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "Generate sample Terraform modules for Octopus Deploy with prompts like these:\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app create a sample terraform module with: three environments called \"Development\", \"Test\", and \"Production\"; a docker feed pointing to dockerhub; three tenants called \"US\", \"Europe\", and \"Asia\"; a project group called \"Web App\"; a project called \"Audits\" with a single powershell script step that echoes \"Hello World\"; and all tenants linked to the project and all environments\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "Logout of your session with:\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "* @octopus-ai-app logout\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "\n"}}]}
data: {"choices": [{"index": 0, "delta": {"content": "See the [documentation](https://octopus.com/docs/administration/copilot) for more information.\n"}}]}
data: {"choices": [{"index": 0, "delta": {}, "finish_reason": "stop"}]}


0



sparklyunicorn:

This output does work in VSCode though:

Image

Is the output of my extension invalid, or is the CLI not printing valid output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant