Enhance agent tool usage for personal queries and improve UI#613
Merged
Conversation
Three issues: 1. Plan prompt didn't emphasise that personal queries MUST use tools. Added explicit instruction: "Never say you can't access something. You have tools for everything." Also injects user context into the plan so the LLM knows the user's state. 2. Synthesis prompt said "Answer using ONLY tool results" which made the LLM refuse when no tools were called. Changed to "Answer using tool results and user context" so it can use the injected context (unread mail count, etc.) directly. 3. Added shortcut mappings for common personal queries so they skip the LLM plan step entirely: "do i have mail", "check my email", "any new mail", "btc price", "today's news", etc. These go straight to the right tool.
The home page is clean again: prompt + suggestions + cards. Submitting the prompt navigates to /agent?prompt=... which handles the full conversation with history, streaming, and proper UX. No more inline grey response box, no localStorage persistence, no consoleScript, no flip layout. The home page is a launcher for the agent, not a chat surface. Suggestion pills are now links to /agent?prompt=... instead of JS onclick handlers. Clicking "3 unread emails" takes you to the agent with that query pre-filled. Removed ~100 lines of consoleScript JS. Removed stream import from home package. Gear icon restored to date line.
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.
No description provided.