mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
feat(core,cli)!: Implement in-process agent backend for arenas
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Add InProcessBackend to run subagents in-process rather than via subprocess, enabling faster initialization and better resource management for agent collaboration arenas. Key changes: - Add InProcessBackend with sandboxed in-process agent execution - Refactor agent runtime into headless vs interactive modes - Add AsyncMessageQueue utility for agent message passing - Update ArenaManager with backend selection (in-process vs subprocess) - Refactor subagent types/exports; consolidate in subagents/types - Remove deprecated agent-hooks.ts (functionality merged into runtime) - Update task tool to support new agent lifecycle Breaking: Subagent type exports restructured; import from subagents/types
This commit is contained in:
parent
e968483a8a
commit
d4cfb18f79
39 changed files with 2951 additions and 502 deletions
|
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
import { theme } from '../semantic-colors.js';
|
||||
import { ArenaAgentStatus } from '@qwen-code/qwen-code-core';
|
||||
import { AgentStatus } from '@qwen-code/qwen-code-core';
|
||||
|
||||
// --- Status Labels ---
|
||||
|
||||
|
|
@ -15,24 +15,17 @@ export interface StatusLabel {
|
|||
color: string;
|
||||
}
|
||||
|
||||
export function getArenaStatusLabel(
|
||||
status: ArenaAgentStatus | string,
|
||||
): StatusLabel {
|
||||
export function getArenaStatusLabel(status: AgentStatus): StatusLabel {
|
||||
switch (status) {
|
||||
case ArenaAgentStatus.COMPLETED:
|
||||
case 'completed':
|
||||
case AgentStatus.COMPLETED:
|
||||
return { icon: '✓', text: 'Done', color: theme.status.success };
|
||||
case ArenaAgentStatus.CANCELLED:
|
||||
case 'cancelled':
|
||||
case AgentStatus.CANCELLED:
|
||||
return { icon: '⊘', text: 'Cancelled', color: theme.status.warning };
|
||||
case ArenaAgentStatus.TERMINATED:
|
||||
case 'terminated':
|
||||
return { icon: '✗', text: 'Terminated', color: theme.status.error };
|
||||
case ArenaAgentStatus.RUNNING:
|
||||
case 'running':
|
||||
case AgentStatus.FAILED:
|
||||
return { icon: '✗', text: 'Failed', color: theme.status.error };
|
||||
case AgentStatus.RUNNING:
|
||||
return { icon: '○', text: 'Running', color: theme.text.secondary };
|
||||
case ArenaAgentStatus.INITIALIZING:
|
||||
case 'initializing':
|
||||
case AgentStatus.INITIALIZING:
|
||||
return { icon: '○', text: 'Initializing', color: theme.text.secondary };
|
||||
default:
|
||||
return { icon: '○', text: status, color: theme.text.secondary };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue