Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Extract atomic file write utility into reusable module. Add arena system reminder injection so orchestrating agents can discover active arena sessions. Support in-process mode status file writing for external consumers.
This enables agent-to-agent collaboration where a parent agent can monitor and coordinate arena sessions via file-based status files.
Shell commands that are semantically equivalent to file/network tool
operations are now analyzed and matched against Read/Edit/Write/
WebFetch/ListFiles permission rules, preventing agents from bypassing
configured rules via the run_shell_command tool.
New file: packages/core/src/permissions/shell-semantics.ts
- extractShellOperations(cmd, cwd) => ShellOperation[]
- Covers 50+ commands: cat/head/tail/diff/grep/rg/ls/find/tree,
touch/mkdir/cp/mv/rm/chmod/chown/sed/awk/dd/curl/wget + redirects
- Handles transparent prefixes: sudo (-u/-g flag values), env, timeout
(skips DURATION), nohup, nice, time, etc.
- Tokenizer respects single/double quotes and backslash escapes
- Redirect extraction: >, >>, <, 2>, &>
Changes: packages/core/src/permissions/permission-manager.ts
- DECISION_PRIORITY constant for combining decisions
- evaluateSingle(): after base Bash-rule decision, evaluate virtual ops
from shell semantics and return the most restrictive result
- evaluateShellVirtualOps(): evaluate ShellOperation list via evaluateSingle
- hasRelevantRules(): also check virtual ops so confirmation dialog appears
when Read/Edit/etc. rules match equivalent shell commands
Changes: packages/core/src/permissions/index.ts
- Export extractShellOperations and ShellOperation
Tests: packages/core/src/permissions/shell-semantics.test.ts
- 52 unit tests: read/list/write/edit/web_fetch ops, redirections,
prefix commands (sudo -u, timeout DURATION), quotes, variable filtering
Adopt Claude Code's approach for webview view registration:
- Use mutual-exclusive sidebar/secondary sidebar with `when` conditions
- Detect secondary sidebar support via VS Code version >= 1.106
- Share single ChatWebviewViewProvider instance across both view IDs
- Only set context key when secondary sidebar is NOT supported
- Pass supportsSecondarySidebar as closure variable to commands
Additional fixes:
- Fix WebViewContent.generate() to accept both Webview and WebviewPanel
- Fix permission handler leak (cancel old promise before new)
- Fix double diff command execution in resolve callback
- Add initializationPromise dedup for auth-restore races
- Add attachToView() for sidebar/secondary sidebar hosting
- Add missing AskUserQuestionResponseMessage import
Co-authored-by: buaoyezz <buaoyezz@users.noreply.github.com>
The /export commands (html, md, json, jsonl) were incorrectly using
loadLastSession() which loads the last modified session from disk,
rather than the currently active session.
This fix uses config.getSessionId() to get the current session ID
and loads the correct session with loadSession(sessionId).
Fixes#2267
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add AgentHeader component showing model, path, and git branch
- Separate modelId and modelName in RegisteredAgent for cleaner display
- Simplify worktree branch naming from worktrees/session/name to base-session-name
- Change loading text from "Agent is working…" to "Thinking…"
- Make agent footer always visible (not just when input is active)
This improves the agent collaboration UX by providing context about each
agent's environment and simplifies the git worktree management.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
The index.ts barrel file had 30+ modules exported multiple times across
scattered sections. This consolidates all exports into a single
well-organized structure with clear section headers, removing 90 lines
of redundant export statements. No functional changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move useArenaInProcess from AppContainer to AgentViewProvider
- Replace polling with config.onArenaManagerChange() callback
- Add success-type progress messages when agents finish tasks
- Add isSuccessStatus helper for IDLE/COMPLETED status checks
- Reset input history position when arena session starts
This improves separation of concerns and eliminates the 500ms polling
interval in favor of immediate reactive updates when the arena manager
changes.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Add info message when chatHistory is passed to spawned agents
- Add tests for info message presence and absence
This provides visibility to users when chat history context is included
in spawned agent sessions.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Add stripStartupContext to remove env-info from parent history and pass
chatHistory through ArenaManager → InProcessBackend → AgentInteractive →
AgentCore. This allows arena agents to start with conversational context
from the main session.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Extract shared BaseTextInput component with readline keyboard handling
- Add AgentComposer and AgentFooter components for agent interaction
- Add useAgentStreamingState hook for managing agent streaming state
- Refactor InputPrompt to use BaseTextInput with agent tab bar focus support
- Move calculatePromptWidths to shared layoutUtils
- Disable auto-accept indicator on agent tabs (agents handle their own)
This enables a dedicated input experience for agent tabs with proper
focus management and keyboard navigation between main input and agent tabs.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Remove 5 tests in 'custom input preserves state' describe block that were
flaky on Windows CI due to timing issues with TextInput state updates and
keyboard navigation.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- Increase wait times from 200ms to 250-300ms for auto-advance tests
- Windows CI can have timing issues with setTimeout precision
This fixes flaky test failures on Windows CI where the 150ms auto-advance
timeout wasn't completing before the next test action.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Replace Promise-based dns.promises.lookup with callback-based dns.lookup
for better compatibility across different Node.js environments (e.g.,
VSCode, Cursor).
The callback-based approach avoids potential issues with Promise-based
DNS lookup in certain IDE embedded terminal environments.