mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-17 22:24:21 +01:00
Docs: Manually trigger summarization (#2526)
This commit is contained in:
@@ -36,12 +36,12 @@ goose configure
|
||||
|
||||
**Options:**
|
||||
|
||||
**`-n, --name <name>`**
|
||||
**`-n, --name <n>`**
|
||||
|
||||
**Usage:**
|
||||
|
||||
```bash
|
||||
goose session --name <name>
|
||||
goose session --name <n>
|
||||
```
|
||||
|
||||
- Resume a previous session
|
||||
@@ -53,7 +53,7 @@ goose configure
|
||||
**Usage:**
|
||||
|
||||
```bash
|
||||
goose session --resume --name <name>
|
||||
goose session --resume --name <n>
|
||||
```
|
||||
|
||||
- Start a session with the specified extension
|
||||
@@ -219,11 +219,11 @@ goose update --reconfigure
|
||||
|
||||
### mcp
|
||||
|
||||
Run an enabled MCP server specified by `<name>` (e.g. `'Google Drive'`)
|
||||
Run an enabled MCP server specified by `<n>` (e.g. `'Google Drive'`)
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
goose mcp <name>
|
||||
goose mcp <n>
|
||||
```
|
||||
|
||||
---
|
||||
@@ -237,12 +237,12 @@ Execute commands from an instruction file or stdin. Check out the [full guide](/
|
||||
- **`-i, --instructions <FILE>`**: Path to instruction file containing commands. Use - for stdin.
|
||||
- **`-t, --text <TEXT>`**: Input text to provide to Goose directly
|
||||
- **`-s, --interactive`**: Continue in interactive mode after processing initial input
|
||||
- **`-n, --name <NAME>`**: Name for this run session (e.g. `daily-tasks`)
|
||||
- **`-n, --name <n>`**: Name for this run session (e.g. `daily-tasks`)
|
||||
- **`-r, --resume`**: Resume from a previous run
|
||||
- **`--recipe <RECIPE_FILE_NAME> <OPTIONS>`**: Load a custom recipe in current session
|
||||
- **`-p, --path <PATH>`**: Path for this run session (e.g. `./playground.jsonl`)
|
||||
- **`--with-extension <COMMAND>`**: Add stdio extensions (can be used multiple times in the same command)
|
||||
- **`--with-builtin <NAME>`**: Add builtin extensions by name (e.g., 'developer' or multiple: 'developer,github')
|
||||
- **`--with-builtin <n>`**: Add builtin extensions by name (e.g., 'developer' or multiple: 'developer,github')
|
||||
|
||||
**Usage:**
|
||||
|
||||
@@ -305,16 +305,17 @@ goose recipe help
|
||||
The CLI provides a set of slash commands that can be accessed during a session. These commands support tab completion for easier use.
|
||||
|
||||
#### Available Commands
|
||||
- `/exit` or `/quit` - Exit the current session
|
||||
- `/t` - Toggle between Light/Dark/Ansi themes
|
||||
- `/extension <command>` - Add a stdio extension (format: ENV1=val1 command args...)
|
||||
- `/builtin <names>` - Add builtin extensions by name (comma-separated)
|
||||
- `/prompts [--extension <name>]` - List all available prompts, optionally filtered by extension
|
||||
- `/prompt <n> [--info] [key=value...]` - Get prompt info or execute a prompt
|
||||
- `/mode <name>` - Set the goose mode to use ('auto', 'approve', 'chat')
|
||||
- `/plan <message>` - Create a structured plan based on the given message
|
||||
- `/?` or `/help` - Display this help message
|
||||
- `/builtin <names>` - Add builtin extensions by name (comma-separated)
|
||||
- `/exit` or `/quit` - Exit the current session
|
||||
- `/extension <command>` - Add a stdio extension (format: ENV1=val1 command args...)
|
||||
- `/mode <n>` - Set the goose mode to use ('auto', 'approve', 'chat')
|
||||
- `/plan <message>` - Create a structured plan based on the given message
|
||||
- `/prompt <n> [--info] [key=value...]` - Get prompt info or execute a prompt
|
||||
- `/prompts [--extension <n>]` - List all available prompts, optionally filtered by extension
|
||||
- `/recipe <recipe file name>` - Generate and save a session recipe to `recipe.yaml` or the filename specified by the command parameter.
|
||||
- `/summarize` - Summarize the current session to reduce context length while preserving key information
|
||||
- `/t` - Toggle between Light/Dark/Ansi themes
|
||||
|
||||
All commands support tab completion. Press `<Tab>` after a slash (/) to cycle through available commands or to complete partial commands.
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ sidebar_label: Smart Context Management
|
||||
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import { ScrollText } from 'lucide-react';
|
||||
|
||||
When working with [Large Language Models (LLMs)](/docs/getting-started/providers), there are limits to how much conversation history they can process at once. Goose provides smart context management features to help you maintain productive sessions even when reaching these limits. Here are the key concepts:
|
||||
|
||||
@@ -28,6 +29,11 @@ When a conversation reaches the context limit, Goose offers different ways to ha
|
||||
<Tabs groupId="interface">
|
||||
<TabItem value="ui" label="Goose Desktop" default>
|
||||
|
||||
Goose Desktop exclusively uses summarization to manage context, preserving key information while reducing size.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="automatic" label="Automatic" default>
|
||||
|
||||
When you reach the context limit in Goose Desktop:
|
||||
|
||||
1. Goose will automatically start summarizing the conversation to make room.
|
||||
@@ -35,15 +41,27 @@ When you reach the context limit in Goose Desktop:
|
||||
3. Once complete, you'll have the option to **"View or edit summary."**
|
||||
4. You can then continue the session with the summarized context in place.
|
||||
|
||||
:::note
|
||||
In Goose Desktop, context management is handled automatically.
|
||||
You won’t see options to `clear` or `truncate` — Goose always uses summarization when the context limit is reached.
|
||||
:::
|
||||
</TabItem>
|
||||
<TabItem value="manual" label="Manual">
|
||||
|
||||
You can proactively summarize your conversation before reaching context limits:
|
||||
|
||||
1. Click the scroll text icon (<ScrollText className="inline" size={16} />) in the chat interface
|
||||
2. Confirm the summarization in the modal
|
||||
3. View or edit the generated summary if needed
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="cli" label="Goose CLI">
|
||||
|
||||
When you reach the context limit in the CLI, you'll see a prompt like this:
|
||||
The CLI offers three context management options: summarize, truncate, or clear your session.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="automatic" label="Automatic" default>
|
||||
|
||||
When you hit the context limit, you'll see this prompt to choose a management option, allowing you to continue your session:
|
||||
|
||||
```sh
|
||||
◇ The model's context length is maxed out. You will need to reduce the # msgs. Do you want to?
|
||||
@@ -60,7 +78,23 @@ Context maxed out
|
||||
Goose summarized messages for you.
|
||||
```
|
||||
|
||||
After choosing an option and the context is managed, you can continue your conversation in the same session.
|
||||
</TabItem>
|
||||
<TabItem value="manual" label="Manual">
|
||||
|
||||
To proactively trigger summarization before reaching context limits, use the `/summarize` command:
|
||||
|
||||
```sh
|
||||
( O)> /summarize
|
||||
◇ Are you sure you want to summarize this conversation? This will condense the message history.
|
||||
│ Yes
|
||||
│
|
||||
Summarizing conversation...
|
||||
Conversation has been summarized.
|
||||
Key information has been preserved while reducing context length.
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
Reference in New Issue
Block a user