Repository navigation
feat: show /login, /logout and /whoami as system notices - #274
setoelkahfi merged 1 commit into
Conversation
There was a problem hiding this comment.
The change refactors how /login, /logout, and /whoami slash commands are surfaced to the user in the Zed editor: instead of plain assistant messages, their responses are now sent as completed think tool calls, which Zed displays as system notices. The new send_system_notice method splits multi-line notices into a title (first line) and body (rest), ensuring URLs remain clickable. The test for /whoami in acp_logout.rs is updated to check for the new system notice format, and a unit test is added for the title/body splitting logic. No findings from previous reviews remain unresolved, and the changes are tightly scoped to the new notice delivery and its test coverage.
Automated review by siGit Code Review · commit 980f80d · see the review dashboard
980f80d to
a4d91fa
Compare
There was a problem hiding this comment.
Switches /login, /logout, and /whoami in ACP to emit a completed think tool card via send_system_notice. split_notice splits the first non-empty line into the card title and the rest into the card body, and the acp_logout test now reads tool_call updates instead of assistant message chunks. No issues found in the changed lines.
Automated review by siGit Code Review · commit a4d91fa · see the review dashboard
89686a6 to
99c3cc2
Compare
These three answered as plain assistant messages. They now go out as a completed think tool call, the lightbulb row Zed draws for system status. A browser /login reply has several lines and a URL, so the new send_system_notice puts the first line in the card title and the rest in its content. The URL stays visible and clickable. The whoami test reads the tool card instead of message chunks. The TUI already renders these as system messages and is unchanged. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
99c3cc2 to
d665d7c
Compare
/login,/logoutand/whoamianswered as plain assistant messages. They now go out as a completedthinktool call, which Zed draws as the lightbulb status row.A browser
/loginreply has several lines and a URL, so the newsend_system_noticeputs the first line in the card title and the rest in its content. The URL stays visible and clickable. The TUI already shows these as system messages and is unchanged.Test plan:
/whoamitest inacp_logout.rsnow reads the tool card (prompt_notice) instead of message chunks.cargo fmt -- --check,cargo clippy --tests -- -D warningsandcargo test --lockedpass.Second PR of the stack. Base is
fix/zed-commands-after-session-response.