Skip to content

Commit 42ba80c

Browse files
authored
refactor!: rename variables to editor context (#2719)
1 parent 5491de9 commit 42ba80c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1025
-1015
lines changed

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Located in `lua/codecompanion/interactions/`:
3232

3333
**Chat Interaction** (`interactions/chat/`)
3434
- Primary interactive mode with buffer-based interface
35-
- Key components: `ui/`, `tools/`, `slash_commands/`, `memory/`, `variables/`, `edit_tracker.lua`, `parser.lua`
35+
- Key components: `ui/`, `tools/`, `slash_commands/`, `memory/`, `editor_context/`, `edit_tracker.lua`, `parser.lua`
3636

3737
**Inline Interaction** (`interactions/inline/`)
3838
- Direct code transformation in Neovim buffers
@@ -74,9 +74,9 @@ Located in `lua/codecompanion/interactions/chat/slash_commands/builtin/`:
7474

7575
Dynamic context ingestion via `/command` syntax in chat.
7676

77-
### Variables & Interactions
77+
### Editor Context & Interactions
7878

79-
**Variables** (`interactions/chat/variables/`): `buffer`, `lsp`, `user`, `viewport` - expanded in system prompts and messages.
79+
**Editor Context** (`interactions/chat/editor_context/`): `buffer`, `lsp`, `user`, `viewport` - expanded in system prompts and messages.
8080

8181
**Background Interactions** (`interactions/background/`): Auto-run LLM tasks with event hooks (e.g., `chat_make_title` auto-generates chat titles).
8282

@@ -162,7 +162,7 @@ LLM Response → Parser → Tools (optional) → Chat Buffer Display
162162
4. Results sent back to LLM
163163

164164
**Context Injection:**
165-
- Variables: Expanded in system prompt
165+
- Editor Context: Expanded in system prompt
166166
- Slash Commands: User-triggered context
167167
- Buffer Watching: Automatic tracking
168168

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ Thank you to the following people:
3333
- :robot: Support for [Agent Client Protocol](https://agentclientprotocol.com/overview/introduction), enabling coding with agents like [Augment Code](https://docs.augmentcode.com/cli/overview), [Cagent](https://github.com/docker/cagent) from Docker, [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview), [Codex](https://openai.com/codex), [Gemini CLI](https://github.com/google-gemini/gemini-cli), [Goose](https://block.github.io/goose/), [Kimi CLI](https://github.com/MoonshotAI/kimi-cli), [Kiro](https://kiro.dev/docs/cli/), [Mistral Vibe](https://github.com/mistralai/mistral-vibe) and [OpenCode](https://opencode.ai)
3434
- :heart_hands: User contributed and supported [adapters](https://codecompanion.olimorris.dev/configuration/adapters#community-adapters)
3535
- :rocket: [Inline transformations](https://codecompanion.olimorris.dev/usage/inline-assistant.html), code creation and refactoring
36-
- :art: [Variables](https://codecompanion.olimorris.dev/usage/chat-buffer/variables.html), [Slash Commands](https://codecompanion.olimorris.dev/usage/chat-buffer/slash-commands.html), [Tools](https://codecompanion.olimorris.dev/usage/chat-buffer/tools.html) and [Workflows](https://codecompanion.olimorris.dev/usage/workflows.html) to improve LLM output
36+
- :art: [Editor Context](https://codecompanion.olimorris.dev/usage/chat-buffer/editor-context.html), [Slash Commands](https://codecompanion.olimorris.dev/usage/chat-buffer/slash-commands.html), [Tools](https://codecompanion.olimorris.dev/usage/chat-buffer/tools.html) and [Workflows](https://codecompanion.olimorris.dev/usage/workflows.html) to improve LLM output
3737
- :brain: Support for [rules](https://codecompanion.olimorris.dev/usage/chat-buffer/rules.html) files like `CLAUDE.md`, `.cursor/rules` and your own custom ones
3838
- :sparkles: Built-in [prompt library](https://codecompanion.olimorris.dev/usage/action-palette.html) for common tasks like advice on LSP errors and code explanations
39-
- :building_construction: Create your own [custom prompts](https://codecompanion.olimorris.dev/configuration/prompt-library.html#creating-prompts), Variables and Slash Commands
39+
- :building_construction: Create your own [custom prompts](https://codecompanion.olimorris.dev/configuration/prompt-library.html#creating-prompts), Editor Context and Slash Commands
4040
- :books: Have [multiple chats](https://codecompanion.olimorris.dev/usage/introduction.html#quickly-accessing-a-chat-buffer) open at the same time
4141
- :art: Support for [vision and images](https://codecompanion.olimorris.dev/usage/chat-buffer/#images-vision) as input
4242
- :muscle: Async execution for fast performance

doc/.vitepress/config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,16 @@ export default withMermaid(
159159
collapsed: true,
160160
items: [
161161
{ text: "Agents", link: "/usage/chat-buffer/agents" },
162+
{
163+
text: "Editor Context",
164+
link: "/usage/chat-buffer/editor-context",
165+
},
162166
{ text: "Rules", link: "/usage/chat-buffer/rules" },
163167
{
164168
text: "Slash Commands",
165169
link: "/usage/chat-buffer/slash-commands",
166170
},
167171
{ text: "Tools", link: "/usage/chat-buffer/tools" },
168-
{ text: "Variables", link: "/usage/chat-buffer/variables" },
169172
],
170173
},
171174
{ text: "Events", link: "/usage/events" },

0 commit comments

Comments
 (0)