Merge PR #6605: fix(tui): restore GitHub refs in slash arguments (@roboomp)
This commit is contained in:
@@ -162,6 +162,9 @@
|
||||
- Fixed Escape waiting for an in-flight `session_stop` extension handler to exhaust its timeout; abort now cancels the active stop pass without reporting a false timeout or applying stale continuation context ([#6489](https://github.com/can1357/oh-my-pi/issues/6489)).
|
||||
- Fixed the agent not resuming after re-answering a past `ask` from the session tree. Committing a new answer via `/tree` branched a fresh sibling `toolResult` and rebuilt context, but nothing ever continued the agent — unlike a live `ask`, whose continuation is intrinsic to the streaming run loop — so the model never consumed the new answer and the session sat idle until a manual prompt. `navigateTree` now reports the commit (`askReanswerCommitted`) and the interactive `/tree` handler resumes the agent via `resumeAfterAskReanswer()` *after* its transcript rebuild, so the resumed turn never renders against the stale pre-rebuild UI. Plain leaf moves and the read-only `reopenAsk` probe stay idle ([#6483](https://github.com/can1357/oh-my-pi/issues/6483)).
|
||||
- Fixed Ctrl+C and fatal shutdown entering an `ExtensionExitError` rejection loop while an extension or hook was still loading ([#6488](https://github.com/can1357/oh-my-pi/issues/6488)).
|
||||
### Fixed
|
||||
|
||||
- Fixed numeric GitHub issue/PR autocomplete being suppressed inside prompt-bearing skill slash-command arguments while preserving literal prompt-action tokens such as `#copy` ([#6604](https://github.com/can1357/oh-my-pi/issues/6604)).
|
||||
|
||||
## [17.1.3] - 2026-07-24
|
||||
|
||||
|
||||
@@ -158,9 +158,11 @@ export class PromptActionAutocompleteProvider implements AutocompleteProvider {
|
||||
if (command && (!("allowArgs" in command) || command.allowArgs !== false)) {
|
||||
const argumentSuggestions = await this.#baseProvider.getSuggestions(lines, cursorLine, cursorCol);
|
||||
if (argumentSuggestions) return argumentSuggestions;
|
||||
// No slash-argument completion for this input: fall through to
|
||||
// internal-url completion only. `#` prompt-action tokens stay
|
||||
// literal text inside slash command arguments.
|
||||
// No slash-argument completion for this input: preserve numeric
|
||||
// GitHub references and internal URLs while keeping prompt-action
|
||||
// tokens such as `#copy` literal.
|
||||
const githubRefSuggestions = getGithubRefSuggestions(textBeforeCursor);
|
||||
if (githubRefSuggestions) return githubRefSuggestions;
|
||||
return getInternalUrlSuggestions(textBeforeCursor, this.#basePath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,11 @@ import { describe, expect, it } from "bun:test";
|
||||
import { KeybindingsManager as AppKeybindingsManager } from "@oh-my-pi/pi-coding-agent/config/keybindings";
|
||||
import { getGithubRefContext, getGithubRefSuggestions } from "@oh-my-pi/pi-coding-agent/modes/github-ref-autocomplete";
|
||||
import { createPromptActionAutocompleteProvider } from "@oh-my-pi/pi-coding-agent/modes/prompt-action-autocomplete";
|
||||
import type { SlashCommand } from "@oh-my-pi/pi-tui";
|
||||
|
||||
function makeProvider() {
|
||||
function makeProvider(commands: SlashCommand[] = []) {
|
||||
return createPromptActionAutocompleteProvider({
|
||||
commands: [],
|
||||
commands,
|
||||
basePath: "/tmp",
|
||||
keybindings: AppKeybindingsManager.inMemory({}),
|
||||
copyCurrentLine: () => {},
|
||||
@@ -119,6 +120,21 @@ describe("github-ref autocomplete — provider integration", () => {
|
||||
expect(issueResult.lines).toEqual(["review issue://3164 "]);
|
||||
});
|
||||
|
||||
it("offers GitHub references inside prompt-bearing skill command arguments", async () => {
|
||||
const provider = makeProvider([{ name: "skill:code-review", description: "Review code", allowArgs: true }]);
|
||||
const line = "/skill:code-review inspect #123";
|
||||
|
||||
const suggestions = await provider.getSuggestions([line], 0, line.length);
|
||||
|
||||
expect(suggestions).toEqual({
|
||||
prefix: "#123",
|
||||
items: [
|
||||
{ value: "pr://123", label: "PR #123", description: "GitHub pull request" },
|
||||
{ value: "issue://123", label: "Issue #123", description: "GitHub issue" },
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
it("constrains to the named type and consumes the qualifier on accept", async () => {
|
||||
const provider = makeProvider();
|
||||
const suggestions = await provider.getSuggestions(["review pr #3164"], 0, 15);
|
||||
|
||||
Reference in New Issue
Block a user