Pr ci fix clean#49816
Conversation
Greptile SummaryThis PR introduces a Key changes:
One minor UX concern: Confidence Score: 4/5
Prompt To Fix All With AIThis is a comment left during a code review.
Path: src/tui/tui-command-handlers.ts
Line: 264-266
Comment:
**Misleading alias display format**
`listAliases` displays each alias as `/${name} -> ${prompt}`, which implies users can invoke it via `/<name>` (e.g. `/review`). However, the `default` branch of `handleCommand` forwards unknown slash commands straight to `sendMessage`, so typing `/review` would literally send the text `/review` to the agent rather than running the alias. The correct invocation is always `/alias <name>`.
Consider formatting the output so it matches the expected invocation, for example:
```suggestion
chatLog.addSystem(`/alias ${name} (-> ${prompt})`);
```
Or at a minimum, add a header line clarifying how to invoke them (e.g. `"run with: /alias <name>"`).
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: "Handle empty quoted ..." |
| for (const [name, prompt] of entries) { | ||
| chatLog.addSystem(`/${name} -> ${prompt}`); | ||
| } |
There was a problem hiding this comment.
Misleading alias display format
listAliases displays each alias as /${name} -> ${prompt}, which implies users can invoke it via /<name> (e.g. /review). However, the default branch of handleCommand forwards unknown slash commands straight to sendMessage, so typing /review would literally send the text /review to the agent rather than running the alias. The correct invocation is always /alias <name>.
Consider formatting the output so it matches the expected invocation, for example:
| for (const [name, prompt] of entries) { | |
| chatLog.addSystem(`/${name} -> ${prompt}`); | |
| } | |
| chatLog.addSystem(`/alias ${name} (-> ${prompt})`); |
Or at a minimum, add a header line clarifying how to invoke them (e.g. "run with: /alias <name>").
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/tui/tui-command-handlers.ts
Line: 264-266
Comment:
**Misleading alias display format**
`listAliases` displays each alias as `/${name} -> ${prompt}`, which implies users can invoke it via `/<name>` (e.g. `/review`). However, the `default` branch of `handleCommand` forwards unknown slash commands straight to `sendMessage`, so typing `/review` would literally send the text `/review` to the agent rather than running the alias. The correct invocation is always `/alias <name>`.
Consider formatting the output so it matches the expected invocation, for example:
```suggestion
chatLog.addSystem(`/alias ${name} (-> ${prompt})`);
```
Or at a minimum, add a header line clarifying how to invoke them (e.g. `"run with: /alias <name>"`).
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 55402bace6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (!inSingle && !inDouble && ch === "\\") { | ||
| tokenStarted = true; | ||
| escaped = true; | ||
| continue; |
There was a problem hiding this comment.
Preserve literal backslashes in alias prompts
When the alias prompt contains unquoted backslashes, this parser treats each \ outside quotes as an escape introducer and drops it. A command like /alias path summarize C:\Users\me\repo is therefore persisted as summarize C:Usersmerepo, so running the alias later sends the wrong prompt. This is a real regression for Windows paths, regexes, and other backslash-heavy prompts unless users remember to quote the entire prompt.
Useful? React with 👍 / 👎.
| const nextAliases = { | ||
| ...state.tuiAliases, | ||
| [aliasName]: aliasPrompt, | ||
| }; | ||
| try { | ||
| await persistAliases(nextAliases); |
There was a problem hiding this comment.
Merge the shared alias file before overwriting it
The TUI loads aliases once at startup, but /alias rewrites the entire aliases.json from the current in-memory map here. If two TUI windows are open, or the file changes externally after startup, saving from the older process will silently discard aliases added by the newer one because nextAliases starts from stale state. For example: window A saves review, window B saves shipit, and the second write leaves only shipit on disk.
Useful? React with 👍 / 👎.
|
Please don't make PRs for test failures on main. The team is aware of those and will handle them directly on the codebase, not only fixing the tests but also investigating what the root cause is. Having to sift through test-fix-PRs (including some that have been out of date for weeks...) on top of that doesn't help. There are already way too many PRs for humans to manage; please don't make the flood worse. Thank you. |
Summary
Describe the problem and fix in 2–5 bullets:
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
List user-visible changes (including defaults/config).
If none, write
None.Security Impact (required)
Yes/No)Yes/No)Yes/No)Yes/No)Yes/No)Yes, explain risk + mitigation:Repro + Verification
Environment
Steps
Expected
Actual
Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
Review Conversations
If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.
Compatibility / Migration
Yes/No)Yes/No)Yes/No)Failure Recovery (if this breaks)
Risks and Mitigations
List only real risks for this PR. Add/remove entries as needed. If none, write
None.