fix(prompt): use mode-aware setup guidance for Web UI vs TUI#68
Merged
LikiosSedo merged 1 commit intomainfrom Mar 10, 2026
Merged
fix(prompt): use mode-aware setup guidance for Web UI vs TUI#68LikiosSedo merged 1 commit intomainfrom
LikiosSedo merged 1 commit intomainfrom
Conversation
The system prompt unconditionally recommended `/setup` for all configuration, but `/setup` is a TUI-only command. Web UI users were incorrectly guided to use it instead of the sidebar Settings → Credentials / Models pages. Make three sections of the prompt mode-aware: - Environment & Configuration: TUI → `/setup`, Web → sidebar Settings - No-credentials guidance: TUI → `/setup` → Credentials, Web → Settings → Credentials - Paste-credential redirect: same split
nightmeng
approved these changes
Mar 10, 2026
Collaborator
nightmeng
left a comment
There was a problem hiding this comment.
LGTM. Clean fix for the mode-aware prompt guidance.
One minor note:
channel mode falls into the web branch — the ternary mode === "cli" ? ... : ... means channel sessions also get "sidebar Settings → Credentials" guidance. Verify this is correct for channel mode (e.g., Slack/DingTalk integrations). If channels don't have a sidebar, they might need their own guidance text. If channel sessions always go through the Web UI for setup, then the current behavior is fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The system prompt in
buildSreSystemPrompt()unconditionally recommended the/setupcommand for all configuration tasks — but/setupis TUI-only. Web UI users were incorrectly guided to use it instead of the sidebar Settings pages, causing confusion (agent would say "use/setup" while also saying "I'm in a Web UI session").Solution
Make all setup/configuration guidance in the system prompt mode-aware (
mode === "cli"vs web/channel):/setupcommand, Web → sidebar Settings → Credentials / Modelscredential_listreturns empty): TUI →/setup→ Credentials → Add, Web → Settings → Credentials page/setup→ Credentials, Web → Settings → Credentials pageTest plan
/setup/setupcommand as beforecredential_listempty path guides to Settings → Credentials