docs(cli): clarify that /clear resets the conversation context#27583
docs(cli): clarify that /clear resets the conversation context#27583Pluviobyte wants to merge 1 commit into
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request improves the CLI documentation to prevent user confusion regarding session management. By clearly distinguishing between the /clear command, which resets the conversation context, and the Ctrl+L shortcut, which only clears the visual display, users can better manage their interaction threads. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation for the /clear command in docs/reference/commands.md to clarify that it resets the conversation context and starts a new session, introduces the /new alias, and explains that the Ctrl+L shortcut only clears the visible screen while keeping the context intact. There are no review comments, and I have no feedback to provide.
Note: Security Review has been skipped due to the limited scope of the PR.
The `/clear` command reference only described clearing the terminal screen. It did not mention that `/clear` (and its `/new` alias) also calls `resetChat()`, which resets the agent's conversation context and starts a new session. This left users unsure how to start a fresh thread without context pollution. Clarify the description, document the `/new` alias, and note that the Ctrl+L shortcut only clears the visible screen while keeping the current conversation context intact (unlike `/clear`). Fixes google-gemini#19239
daca1a5 to
bc99e22
Compare
Summary
The
/clearcommand reference only documented clearing the terminal screen. It did not mention that/clear(and its/newalias) also resets the agent's conversation context and starts a new session, so users were left unsure how to start a fresh thread without context pollution.Details
clearCommand(packages/cli/src/ui/commands/clearCommand.ts) callsgeminiClient.resetChat()andconfig.resetNewSessionState(...). These reset the conversation context the model sees and start a new session — not just the visible output.In contrast, the Ctrl+L shortcut maps to
CLEAR_SCREEN(handleClearScreen), which only clears the visible items (historyManager.clearItems()) and does not reset the conversation. The previous wording implied Ctrl+L was equivalent to/clear.This PR updates
docs/reference/commands.md:/clearclears the screen and resets the conversation context (fresh thread)./newalias.Documentation only; no code behavior changes.
Related Issues
Fixes #19239
How to Validate
npx prettier --check docs/reference/commands.md→ passes.docs/reference/commands.mdat the### /clearsection and confirm it now describes the context reset, the/newalias, and the Ctrl+L distinction.Pre-Merge Checklist
prettier --checkon the changed file)