Skip to content

feat: show /login, /logout and /whoami as system notices - #274

Merged
setoelkahfi merged 1 commit into
fix/zed-commands-after-session-responsefrom
feature/account-commands-system-status
Nov 17, 2026
Merged

setoelkahfi merged 1 commit into
fix/zed-commands-after-session-responsefrom
feature/account-commands-system-status

Conversation

@setoelkahfi

@setoelkahfi setoelkahfi commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

/login, /logout and /whoami answered as plain assistant messages. They now go out as a completed think tool call, which Zed draws as the lightbulb status row.

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 TUI already shows these as system messages and is unchanged.

Test plan:

  • The /whoami test in acp_logout.rs now reads the tool card (prompt_notice) instead of message chunks.
  • Unit test for the title/body split.
  • cargo fmt -- --check, cargo clippy --tests -- -D warnings and cargo test --locked pass.

Second PR of the stack. Base is fix/zed-commands-after-session-response.

@setoelkahfi
setoelkahfi added this pull request to stack #277 October 29, 2026 16:37
@setoelkahfi
setoelkahfi marked this pull request as ready for review October 29, 2026 16:55
@setoelkahfi
setoelkahfi requested a review from paydii October 29, 2026 16:55
@setoelkahfi setoelkahfi self-assigned this Oct 29, 2026

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

@setoelkahfi
setoelkahfi force-pushed the feature/account-commands-system-status branch from 980f80d to a4d91fa Compare November 7, 2026 09:32

@sigit-code-review sigit-code-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

@setoelkahfi
setoelkahfi force-pushed the feature/account-commands-system-status branch 2 times, most recently from 89686a6 to 99c3cc2 Compare November 7, 2026 12:31
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>
@setoelkahfi
setoelkahfi force-pushed the feature/account-commands-system-status branch from 99c3cc2 to d665d7c Compare November 17, 2026 09:10
@setoelkahfi
setoelkahfi merged commit 12d61fb into development Nov 17, 2026
9 checks passed
@setoelkahfi
setoelkahfi deleted the feature/account-commands-system-status branch November 17, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants