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
2 changes: 1 addition & 1 deletion build/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5468,7 +5468,7 @@ function validMessageText(value) {
}
function safeDynamicText(value) {
return validMessageText(value)
&& !/[\r\n\u202A-\u202E\u2066-\u2069]/u.test(value)
&& !/[\p{Cc}\u202A-\u202E\u2066-\u2069]/u.test(value)
&& !/<!--|-->|<\/?[A-Za-z]|https?:\/\/|```|[`*_[\]~|]|(^|\s)\/(?:copilot)(?:\s|$)|@[A-Za-z0-9]/iu.test(value);
}
function pluralPlaceholderParity(message) {
Expand Down
288 changes: 186 additions & 102 deletions build/cli/index.js

Large diffs are not rendered by default.

196 changes: 142 additions & 54 deletions build/github_action/index.js

Large diffs are not rendered by default.

17 changes: 13 additions & 4 deletions docs/development/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ and reply workflows validate exact bot ownership, stable correlation or topic
identity, and semantic digests before creating or updating a comment. The
checked-in publication mutation inventory fails CI if a new application use
case writes a comment or review without an explicit architectural decision.
Initial issue help follows that rule: the agent step returns an immutable
`direct-answer` projection and never receives a GitHub mutation port. The shared
reply reconciler sanitizes and publishes that answer once for the event
correlation. Issue routing emits a welcome only when an eligible normal issue
Initial issue help and addressed Think requests follow that rule: each agent
step returns an immutable `direct-answer` projection and receives no GitHub
mutation port. The shared reply reconciler sanitizes and publishes the answer
once for the source-comment or event correlation. Optional translation evidence
stays typed until this publication boundary; the renderer uses the same resolved
catalog as the answer and creates the inert, collapsed original-request block.
Issue routing emits a welcome only when an eligible normal issue
produces neither a publishable plan nor a direct answer; release and hotfix
issues leave conversation ownership to their durable dashboard. Before the
optional fallback is emitted, a read-only comment port checks exact-target,
Expand Down Expand Up @@ -54,6 +57,12 @@ an exact canonical match before any product mutation. An architecture test
compares the call sites with that inventory, while strict-schema tests require
the locale field in every response contract.

Repository-aware local actions reuse that catalog boundary for terminal labels.
The Think CLI renders its semantic payload under a localized `Answer` label and
does not need a synthetic GitHub issue or a comment mutation; `--issue` adds
optional issue-description context only. Machine keys and command names remain
English.

Language adaptation is separate from catalog resolution. Comment admission,
command parsing, and authorization establish trusted command identity before at
most one prose adaptation. The language port has no comment-update capability:
Expand Down
2 changes: 1 addition & 1 deletion docs/features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Codex is the default runtime for the repository's AI feature paths. OpenCode and
| **Check progress** | Push (commit) pipeline; optional single action `check_progress_action` / CLI `check-progress` | Compares issue vs branch diff, updates progress labels, and reconciles one issue progress card only when its semantic projection changes. It does not post per-commit narration. |
| **Bugbot (potential problems)** | Push (commit) pipeline; optional single action `detect_potential_problems_action` / CLI `detect-potential-problems` | Analyzes branch vs base and posts bounded findings near code plus one concise aggregate status card. A clean full-coverage card omits empty tables and technical detail; incomplete coverage names an effective recovery action instead of requesting identical rechecks. |
| **Do user request** | Issue comment; PR review comment | When you comment asking to perform a change in the repo (or use `/copilot implement <request>`), the configured agent applies the changes in the workspace, runs verify commands, and the action commits and pushes with a generic message. Organization repositories require an org member; personal repositories require the owner or a `push`/`maintain`/`admin` collaborator. Uses the same `bugbot-fix-verify-commands` and agent CLI setup. |
| **Think / reasoning** | Issue/PR comment pipeline; single action `think_action` | Deep code analysis and change proposals (configured agent CLI). On comments, answers an explicit `/copilot` command or exact bot mention. Runs when the addressed comment was not a fix/do request or when the user is not allowed to trigger file-modifying actions. |
| **Think / reasoning** | Issue/PR comment pipeline; single action `think_action` | Deep code analysis and change proposals (configured agent CLI). On GitHub, returns one sanitized, correlated semantic answer to an explicit `/copilot` command or exact bot mention; Think itself has no comment mutation capability. In the CLI, it prints the answer locally and `--issue` is optional context. |
| **Explicit Copilot commands** | Issue and PR comments | `/copilot help`, `/copilot plan`, `/copilot clarify`, `/copilot estimate`, `/copilot test-plan`, `/copilot explain`, `/copilot diagnose`, `/copilot analyze`, `/copilot status`, `/copilot review`, `/copilot findings`, `/copilot recheck`, `/copilot fix`, `/copilot dismiss`, `/copilot remember`, `/copilot implement`, and `/copilot sync-branch` provide a bounded, predictable interface. |
| **Branch synchronization** | All-branch push observer; issue/PR command | Detection is agent-free. An authorized command merges parent into working branch, invokes the fixer only for eligible Git conflicts, validates the prepared merge, runs configured checks, revalidates remote heads, pushes, and reports the outcome. |
| **Repository language and request adaptation** | Generated GitHub UI; addressed issue/PR comments | Uses `repository-locale` (`en-US` by default), with optional inheriting `issues-locale` and `pull-requests-locale` overrides. An addressed foreign-language request is safely interpreted once; its source comment is never edited, and translation context appears only with the useful bot response. Unaddressed human and automated comments are inert. |
Expand Down
16 changes: 11 additions & 5 deletions docs/issues/comment-commands.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ resolved. If the stored workflow result owns malformed finding-state evidence,
the command says that evidence is invalid and directs you to the workflow
result; it never substitutes zero or a clean state.

`/copilot help` and `/copilot status` use correlated reply markers. A webhook
retry with the same source comment does not create another response. These
explicit replies contain only their requested content; they are never wrapped
in an “Automatic Actions” summary.
Every explicit answer uses a correlated reply marker. A webhook retry with the
same source comment updates or reuses that response instead of creating another.
These replies contain only their requested content; they are never wrapped in an
“Automatic Actions” summary or a list of internal steps.

GitHub delivers a comment in the main PR conversation as an `issue_comment`
event. Copilot uses GitHub's PR marker and exact PR number to keep that transport
Expand All @@ -84,7 +84,13 @@ The first three are read-only requests. The last one may be classified as a gene

Language detection and translation apply only after this same explicit
command-or-mention boundary. Copilot does not passively translate ordinary
conversation or machine-authored status comments.
conversation or machine-authored status comments. When an addressed request is
translated, its one useful answer ends with a collapsed, localized block named
“Interpreted request” and “Original request” in the effective issue or PR
locale. The human comment is never edited, and a translation never creates its
own timeline comment. English is used when no locale is configured; any valid
configured BCP-47 locale uses its complete resolved catalog or an atomic English
fallback.

## Authorization and safety

Expand Down
3 changes: 3 additions & 0 deletions docs/security-operations/security/prompt-injection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ only for a structured language decision or translation. The workflow:
- preserves the original comment as escaped inert text;
- neutralizes mentions, slash commands, and HTML-comment markers in the
translated publication;
- carries the bounded interpretation and original as typed data until the shared
semantic reply renderer resolves one complete locale catalog, then escapes the
original at that final publication boundary;
- writes a versioned marker only in the bot-owned response so the adaptation context cannot re-enter command routing;
- never treats translated text as an action request.

Expand Down
5 changes: 5 additions & 0 deletions docs/single-actions/examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,13 @@ copilot recommend-steps -i 789

```bash
copilot think -q "Where is authentication validated?"
copilot think -i 123 -q "Summarize the issue and identify the next risk"
```

The first form does not probe a default issue. The optional `-i/--issue` form
adds that issue description to the analysis context. Both print one localized
`Answer` locally and create no GitHub comment.

### do (CLI-only, execution role)

```bash
Expand Down
7 changes: 5 additions & 2 deletions docs/single-actions/workflow-and-cli.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,15 @@ copilot recommend-steps -i 789

### `copilot think`

Runs deep code analysis and returns change proposals from the configured agent. The question is required; the issue and branch options provide repository context.
Runs deep code analysis and prints the configured agent's semantic response under
a localized `Answer` label. The question is required; issue and branch options
provide optional repository context. This local command does not create or
update a GitHub comment.

| Option | Required | Default | Description |
| --- | --- | --- | --- |
| `-q, --question <question...>` | Yes | — | Question or prompt. Multiple words may be supplied without shell quoting each word. |
| `-i, --issue <number>` | No | `1` | Issue number used when the repository has that issue context. |
| `-i, --issue <number>` | No | none | Optional issue whose description is added to the analysis context. Omitting it never probes or requires issue `#1`. |
| `-b, --branch <name>` | No | `master` | Branch to use for the analysis context. |
| `-t, --token <token>` | No | `PERSONAL_ACCESS_TOKEN` | PAT override. |
| `--ai-ignore-files <patterns>` | No | `node_modules/*,build/*` | Comma-separated file patterns excluded from AI context. |
Expand Down
Loading