Skip to content
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/run-continue-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run Continue Agent

on:
workflow_call:
inputs:
prompt:
description: "The prompt to send to the Continue agent"
required: true
type: string
agent:
description: "The agent to use (e.g., continuedev/default-background-agent)"
required: false
type: string
default: "continuedev/default-background-agent"
branch_name:
description: "The base branch name to work from"
required: false
type: string
default: "main"
secrets:
CONTINUE_API_KEY:
required: true

jobs:
run-agent:
runs-on: ubuntu-latest

steps:
- name: Call agents endpoint
run: |
response=$(curl -f -X POST https://api.continue.dev/agents \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.CONTINUE_API_KEY }}" \
-d '{
"prompt": "${{ inputs.prompt }}",
"agent": "${{ inputs.agent }}",
"branchName": "${{ inputs.branch_name }}",
"repoUrl": "https://github.com/${{ github.repository }}"
}')
id=$(echo $response | jq -r '.id')
echo "https://hub.continue.dev/agents/$id"
17 changes: 17 additions & 0 deletions .github/workflows/tidy-up-codebase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Weekly CN Task

on:
schedule:
# Runs at 8/9:30 AM PST (16:30 UTC) every Monday so PR shows up at beginning of week
- cron: "30 16 * * 1"
workflow_dispatch: # Allows manual triggering

jobs:
run-cn-task:
uses: ./.github/workflows/run-continue-agent.yml
with:
prompt: "Review every Markdown documentation file and verify that descriptions, examples, or behavior outlines accurately reflect the current code. Only update documentation; do not modify code. Check the corresponding code to confirm behavior before making changes. Correct any inaccuracies or outdated information in descriptions, examples, or behavior outlines. Preserve existing Markdown formatting, style, and structure. Do not add new sections, speculative explanations, or details not present in the code. Only update statements that are clearly incorrect or misleading; do not rewrite text for style or preference. Keep edits minimal and focused, ensuring that the Markdown matches what the code actually does. If verification against the code is ambiguous, leave the documentation unchanged. Use branch name bot/cleanup-<YYMMDD>-<HHMM>"
agent: continuedev/default-background-agent
branch_name: main
secrets:
CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }}
2 changes: 1 addition & 1 deletion core/indexing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The indexing process does the following:

All indexes must be returned by `getIndexesToBuild` in [`CodebaseIndexer.ts`](./CodebaseIndexer.ts) if they are to be used.

`CodeSnippetsIndex`: uses tree-sitter queries to get a list of functions, classes, and other top-level code objects in each file
`CodeSnippetsCodebaseIndex`: uses tree-sitter queries to get a list of functions, classes, and other top-level code objects in each file
`FullTextSearchCodebaseIndex`: creates a full-text search index using SQLite FTS5
`ChunkCodebaseIndex`: chunks files recursively by code structure, for use in other embeddings providers like `LanceDbIndex`
`LanceDbIndex`: calculates embeddings for each chunk and adds them to the LanceDB vector database, with metadata going into SQLite. Note that for each branch, a unique table is created in LanceDB.
Expand Down
71 changes: 1 addition & 70 deletions extensions/cli/spec/shell-mode.md
Original file line number Diff line number Diff line change
@@ -1,73 +1,4 @@
shell Mode (CLI TUI)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like there was duplicate text in the spec?


Overview

- shell mode lets users run shell commands directly from the chat input by starting their input with an exclamation mark (!).
- It is intended for quick terminal command execution without leaving the TUI.

Activation

- shell mode is activated when the current input (trimmed) starts with !
- Example: "!git status" or " !ls -la" both activate shell mode.
- Visual indicator:
- Input border color changes to yellow.
- The input prompt indicator changes to a yellow "$".
- The input placeholder includes "! for shell mode".

Deactivation / Exiting shell Mode

- Pressing Enter to submit the input exits shell mode immediately after submission, regardless of the command result.
- Pressing Esc when the input (trimmed) is exactly ! clears the input and exits shell mode.
- Editing the input so it no longer starts with ! also exits shell mode and restores normal input behavior.

Interaction with other input helpers

- When in shell mode (input starts with !):
- "@" file search suggestions are disabled.
- "/" slash command UI is disabled.
- When in slash command mode (input starts with /):
- "@" file search suggestions are disabled.

Submission behavior

- On submit (Enter) with a shell-mode input:
- The leading ! is removed and the remainder is treated as the shell command to run.
- The TUI immediately appends an assistant message representing a shell tool call, with status set to calling, so users can see that the command is in progress.
- The shell command is executed asynchronously; when it completes, the tool call status is updated to done (or error) and the output is populated.

Execution semantics

- The command is executed in the same way as terminal tool commands, minus permissions

Output handling

- Stdout is streamed into memory; Stderr is captured and appended as a trailing "Stderr: ..." section on success.
- If the process exits non-zero and Stderr contains content, the tool call is marked as error and the error text is shown.
- Output is truncated to the first 5000 lines if exceeded.
- Timeout behavior: If no output is received for 30 seconds (configurable in tests), the process is terminated and the result includes a note like:
"[Command timed out after 30 seconds of no output]".

Keyboard behaviors (summary)

- Enter: submit input. If in shell mode, exits shell mode after submission and shows the pending shell tool call immediately.
- Shift+Enter: new line.
- Backslash (\) at end-of-line: inserts a new line (line continuation) as usual.
- Esc: if only ! (trimmed) is present, clears input and exits shell mode; otherwise cancels streaming or closes suggestions depending on context.

Scope / Modes

- shell mode applies to interactive (TUI/standard) CLI usage. It is not part of headless (-p/--print) processing.

Error handling

- Command execution errors are captured and surfaced in the tool call as status error with human-readable error text (including Stderr when available).

Examples

- "!git status" → shows a shell tool call immediately, then populates with the git status output.
- "!echo hello" → shows a shell tool call immediately, then output "hello".
- "!some-unknown-cmd" → shows a shell tool call immediately, then sets status to error with an error message.
Shell Mode (CLI TUI)
Shell Mode (CLI TUI)

Overview

Expand Down
Loading