Fix /clear command, places JSON parsing, stale AI prices, agent silent failures#171
Merged
Fix /clear command, places JSON parsing, stale AI prices, agent silent failures#171
Conversation
… AI prompt improvements Co-authored-by: asim <17530+asim@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove clear history button and switch to /clear command
Fix /clear command, places JSON parsing, stale AI prices, agent silent failures
Mar 2, 2026
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.
The clear history button was unusable on mobile, the agent quoted stale training prices even when live data was fetched, and the places search always failed silently when called via the agent.
Chat: replace clear button with
/clearcommand<a id="chat-clear">from the chat template/clearinaskLLM()before the fetch, callclearChatHistory()client-sideAI system prompt: current date + live data framing
time.Now()asToday's date is …so the model has temporal groundingPlaces: fix JSON body parsing for agent tool calls
handleSearch/handleNearbyread params viar.ParseForm()only.api.ExecuteToolsends a JSON body, so params were always empty → 400 → agent showed "unavailable". Extracted a shared helper:Both handlers now call
parseRequestParams(r), handling both form (web UI) and JSON (agent/API).Agent: log tool failures + stronger synthesiser prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.