Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/reference/configuration-reference
version: 2.1

# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/guides/orchestrate/jobs-steps/#jobs-overview & https://circleci.com/docs/reference/configuration-reference/#jobs
jobs:
say-hello:
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub.
# See: https://circleci.com/docs/guides/execution-managed/executor-intro/ & https://circleci.com/docs/reference/configuration-reference/#executor-job
docker:
# Specify the version you desire here
# See: https://circleci.com/developer/images/image/cimg/base
- image: cimg/base:current

# Add steps to the job
# See: https://circleci.com/docs/guides/orchestrate/jobs-steps/#steps-overview & https://circleci.com/docs/reference/configuration-reference/#steps
steps:
# Checkout the code as the first step.
- checkout
- run:
name: "Say hello"
command: "echo Hello, World!"

# Orchestrate jobs using workflows
# See: https://circleci.com/docs/guides/orchestrate/workflows/ & https://circleci.com/docs/reference/configuration-reference/#workflows
workflows:
say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- say-hello
38 changes: 31 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ The different SSE events in the [agent protocol](TODO) that the CLI gives debug
```
1. See more info about the cli tool
```shell
gh debug-cli -h
gh debug-cli chat -h
```

## Using the debug tool
1. Run the following command `gh debug-cli -h` to see the different flags that it takes in.
## Using the debug chat tool
1. Run the following command `gh debug-cli chat -h` to see the different flags that it takes in.
```
> gh debug-cli -h
> gh debug-cli chat -h
This cli tool allows you to debug your agent by chatting with it locally.

Usage:
Expand All @@ -47,15 +47,15 @@ export URL="http://localhost:8080/agent/blackbeard"
```
3. When you run the CLI, you will see any flags that were previously set in your environment variables as the output.
```
> gh debug-cli
> gh debug-cli chat
Setting url to http://localhost:8080/agents/blackbeard

Start typing to chat with your assistant...
sparklyunicorn:
```
4. Type something to simulate chatting with your assistant.
```
> gh debug-cli
> gh debug-cli chat
Setting url to http://localhost:8080/agents/blackbeard

Start typing to chat with your assistant...
Expand Down Expand Up @@ -114,7 +114,7 @@ assistant: Avast, @monalisa! Me apologies if I didn't quite understand yer reque
```
7. And if debug mode was set to false, then I would only see the confirmation prompt itself.
```
gh debug-cli --log-level none
gh debug-cli chat --log-level none
Setting url to http://localhost:8080/agents/blackbeard

Start typing to chat with your assistant...
Expand All @@ -126,3 +126,27 @@ Be ye sure ye want a custom limerick 'bout petals ?
Reply: [y/N]
```
8. Currently, the supported event types for debug mode are references, errors, and confirmations! Have fun chatting with your assistant!

## Using the gh debug stream tool
1. To quickly parse an agent response by running command `gh debug-cli stream --file test.txt`

2. This tool will take llm streaming response and parse it to make it more readable

- In this example, if a file test.txt holds the following streamed response. Then will return the response "A closure in JavaScript is a function that retains access... " This will make repsonse more readable.

example of .txt file

```
data: {"choices":[{"delta":{"content":"A closure in JavaScript "}}],"created":1727120830,"id":"chatcmpl-AAjJW0Nz9E2Gu1P6YQMFqqmn10mdR","model":"gpt-4o-2024-05-13","system_fingerprint":"fp_80a1bad4c7"}
data: {"choices":[{"delta":{"content":"is a function that retains access "}}],"created":1727120831,"id":"chatcmpl-AAjJW0Nz9E2Gu1P6YQMFqqmn10mdR","model":"gpt-4o-2024-05-13","system_fingerprint":"fp_80a1bad4c7"}
data: {"choices":[{"delta":{"content":"to its lexical scope, even "}}],"created":1727120832,"id":"chatcmpl-AAjJW0Nz9E2Gu1P6YQMFqqmn10mdR","model":"gpt-4o-2024-05-13","system_fingerprint":"fp_80a1bad4c7"}
data: {"choices":[{"delta":{"content":"when the function is executed "}}],"created":1727120833,"id":"chatcmpl-AAjJW0Nz9E2Gu1P6YQMFqqmn10mdR","model":"gpt-4o-2024-05-13","system_fingerprint":"fp_80a1bad4c7"}
data: {"choices":[{"delta":{"content":"outside that scope. "}}],"created":1727120834,"id":"chatcmpl-AAjJW0Nz9E2Gu1P6YQMFqqmn10mdR","model":"gpt-4o-2024-05-13","system_fingerprint":"fp_80a1bad4c7"}
```

## Copilot Extensions Documentation
- [Using Copilot Extensions](https://docs.github.com/en/copilot/using-github-copilot/using-extensions-to-integrate-external-tools-with-copilot-chat)
- [About building Copilot Extensions](https://docs.github.com/en/copilot/building-copilot-extensions/about-building-copilot-extensions)
- [Set up process](https://docs.github.com/en/copilot/building-copilot-extensions/setting-up-copilot-extensions)
- [Communicating with the Copilot platform](https://docs.github.com/en/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-the-copilot-platform)
- [Communicating with GitHub](https://docs.github.com/en/copilot/building-copilot-extensions/building-a-copilot-agent-for-your-copilot-extension/configuring-your-copilot-agent-to-communicate-with-github)