mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 04:30:48 +00:00
feat(arena): improve agent UI with header info and simplify worktree branches
- 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>
This commit is contained in:
parent
d7aa98a0c0
commit
cecc960254
13 changed files with 200 additions and 108 deletions
|
|
@ -33,7 +33,10 @@ import { useArenaInProcess } from '../hooks/useArenaInProcess.js';
|
|||
|
||||
export interface RegisteredAgent {
|
||||
interactiveAgent: AgentInteractive;
|
||||
displayName: string;
|
||||
/** Model identifier shown in tabs and paths (e.g. "glm-5"). */
|
||||
modelId: string;
|
||||
/** Human-friendly model name (e.g. "GLM 5"). */
|
||||
modelName?: string;
|
||||
color: string;
|
||||
}
|
||||
|
||||
|
|
@ -60,8 +63,9 @@ export interface AgentViewActions {
|
|||
registerAgent(
|
||||
agentId: string,
|
||||
interactiveAgent: AgentInteractive,
|
||||
displayName: string,
|
||||
modelId: string,
|
||||
color: string,
|
||||
modelName?: string,
|
||||
): void;
|
||||
unregisterAgent(agentId: string): void;
|
||||
unregisterAll(): void;
|
||||
|
|
@ -173,12 +177,18 @@ export function AgentViewProvider({
|
|||
(
|
||||
agentId: string,
|
||||
interactiveAgent: AgentInteractive,
|
||||
displayName: string,
|
||||
modelId: string,
|
||||
color: string,
|
||||
modelName?: string,
|
||||
) => {
|
||||
setAgents((prev) => {
|
||||
const next = new Map(prev);
|
||||
next.set(agentId, { interactiveAgent, displayName, color });
|
||||
next.set(agentId, {
|
||||
interactiveAgent,
|
||||
modelId,
|
||||
color,
|
||||
modelName,
|
||||
});
|
||||
return next;
|
||||
});
|
||||
// Seed approval mode from the agent's own config
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue