Repository navigation
RFC: Chat V2 (One-Shot Chat, Settings, Sessions) #4174
siavashdev
started this conversation in
Request for Comment (RFC)
Replies: 1 comment
|
Hey @jeremyfowers, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Proposal size
Major feature (spans multiple well-scoped PRs)
Updates
No response
User story
Providing the ability to use chat in scripts, control over model settings and conversations that survive closing the terminal for users. One-shot and interactive chat should use the same settings and history, without requiring another client.
This expands the use of Chat REPL feature to more than a quick model test.
High-level design
This proposal extends
lemonade chatwithout adding server-side conversation stateOne-Shot Chat
Use Lemonade in shell scripts and pipelines (lemonade chat MODEL "summarize" < log.txt) without the interactive UI.
lemonade chat [MODEL] -p "text"sends one request and exits. Piped stdin also selects one-shot mode.Shared Settings
Foundation for the session feature. But only one json settings file will be used for both interactive chat and one-shot commands feature. Each saved session keeps its own settings.
--temperature,--top-p,--max-tokens,--seed,--ctx-sizeto chat./set KEY VALUEupdates settings;/showdisplays effective values.Persistent Sessions
Sessions stay local in a subfolder of the CLI config directory.
--no-savedisables writes for that invocation.--continueopens the most recently used session.--resume ID_OR_NAMEopens an existing session.--session NAMEopens or creates a named session, including across one-shot calls./historylists sessions for selection./rename NAMEnames the current session;/delete ID_OR_NAMEremoves one, with confirmation.Breaking changes
Existing interactive commands keep their behavior. Autosave introduces local transcript storage; document it prominently and provide
--no-save. Piped input now runs once instead of entering the REPL.Maintenance plan
CI protects the feature; human testers check terminal behavior.
--no-save, interrupted writes, concurrent access, and JSON/Markdown round trips.Risks
For the session feature, transcripts will be saved to users machine without encryption.
Could implement use owner-only access, atomic writes and per-session locking and deletion for mitigation.
All reactions