Repository navigation
FIX: show command examples for contextual follow-ups - #58
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the history-aware contextual follow-up changes.
No open issues 🎉
What changed in this PR
This PR enables history-aware contextual follow-ups to produce complete, display-only shell command examples. System One receives conversation-history availability, while prompt guidance and retry handling resolve omitted command context.
Changes:
- Added history-aware routing metadata and guidance for contextual command follow-ups.
- Added prompts for resolving prior commands and showing revised examples without execution.
- Added documentation and regression coverage for saved history, retries, and display-only behavior.
| File | Description |
|---|---|
| README.md | Documents contextual command follow-ups and display-only example behavior. |
| internal/systemone/client.go | Adds history availability to intent requests and expands follow-up routing criteria. |
| internal/systemone/client_test.go | Verifies serialization of the history state in intent requests. |
| internal/app/prompts.go | Adds shared prompt guidance for resolving contextual shell command references. |
| internal/app/command_retry_test.go | Tests saved-history follow-ups, missing-command retries, and non-execution of displayed examples. |
| internal/app/app.go | Passes conversation-history availability during intent routing. |
| internal/app/app_test.go | Updates routing assertions for the expanded intent request. |
Review effort: Lite
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.
What changed
CLAI can route a short follow-up about a previous command’s target or options through the shell-instructions workflow. System One gets the current request and a history-available flag. The response model uses the saved conversation to produce the complete command example. Shell instructions remain display-only and get one retry if the model omits the command.
Example
After discussing
tmux attach-session -t builder,clai "what is the -t for?"explains the flag.clai "what about last session?"then showstmux attach-sessionfor use from outside tmux. tmux prefers the most recently used unattached session when selecting by recency. tmux manualVerification
tmux attach-sessionas an example.go test -race ./...,go vet ./..., and the production duplication check passed locally.