refactor: remove terminal agent concept entirely
Remove the "agent can be a terminal" branching from the entire codebase. An agent is now always a session-backed chat agent. Standalone terminal infrastructure (terminal component, ANSI handling, terminal-stream-protocol) is preserved. Server: delete ManagedTerminalAgent, AgentKind, TerminalExitDetails, launchTerminalAgent, registerTerminalAgent, handleTerminalAgentExited, supportsTerminalMode capability, buildTerminalCreate/ResumeCommand from all providers, terminal agent persistence/projections. App: delete terminal-agent-panel.tsx, terminal-agent-reopen-store.ts, terminal/terminalExit fields on agent state, "Terminal Agents" launcher section, terminal-agent workspace setup flow, terminal badge in agent list. CLI: remove terminal column from ls, terminal-agent error from send. 60 files changed, -3592 lines
This commit is contained in:
@@ -89,12 +89,6 @@ export async function waitForLauncherPanel(page: Page): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
/** Assert that the launcher panel shows provider tiles under "Terminal Agents". */
|
||||
export async function assertProviderTilesVisible(page: Page): Promise<void> {
|
||||
await expect(page.getByText("Terminal Agents", { exact: true }).first()).toBeVisible({
|
||||
timeout: 10_000,
|
||||
});
|
||||
}
|
||||
|
||||
/** Assert the launcher panel has a "New Chat" tile. */
|
||||
export async function assertNewChatTileVisible(page: Page): Promise<void> {
|
||||
@@ -122,12 +116,6 @@ export async function clickTerminal(page: Page): Promise<void> {
|
||||
await button.click();
|
||||
}
|
||||
|
||||
/** Click a provider tile by label (e.g. "Claude Code", "Codex"). */
|
||||
export async function clickProviderTile(page: Page, providerLabel: string): Promise<void> {
|
||||
const tile = page.getByRole("button", { name: providerLabel }).first();
|
||||
await expect(tile).toBeVisible({ timeout: 10_000 });
|
||||
await tile.click();
|
||||
}
|
||||
|
||||
// ─── Tab title assertions ──────────────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import { expect, type Page } from "@playwright/test";
|
||||
import {
|
||||
clickNewChat,
|
||||
clickProviderTile,
|
||||
clickTerminal,
|
||||
countTabsOfKind,
|
||||
getTabTestIds,
|
||||
waitForTabWithTitle,
|
||||
} from "./launcher";
|
||||
import { setupDeterministicPrompt, waitForTerminalContent } from "./terminal-perf";
|
||||
|
||||
@@ -35,13 +33,6 @@ export async function createStandaloneTerminalFromLauncher(page: Page): Promise<
|
||||
await expect.poll(async () => (await getTabTestIds(page)).length).toBe(tabIdsBefore.length);
|
||||
}
|
||||
|
||||
export async function createTerminalAgentFromLauncher(page: Page, providerLabel: string): Promise<void> {
|
||||
await clickProviderTile(page, providerLabel);
|
||||
await expect(page.getByTestId("terminal-agent-loading")).toHaveCount(0, { timeout: 30_000 });
|
||||
await expect(terminalSurface(page)).toBeVisible({ timeout: 30_000 });
|
||||
await waitForTabWithTitle(page, /new agent/i);
|
||||
}
|
||||
|
||||
export async function createAgentChatFromLauncher(page: Page): Promise<void> {
|
||||
await clickNewChat(page);
|
||||
await expect(composerInput(page)).toBeVisible({ timeout: 15_000 });
|
||||
|
||||
@@ -186,26 +186,6 @@ export async function createChatAgentFromWorkspaceSetup(
|
||||
await dialog.getByRole("button", { name: "Send message" }).click();
|
||||
}
|
||||
|
||||
export async function createTerminalAgentFromWorkspaceSetup(
|
||||
page: Page,
|
||||
input: { providerLabel: string; prompt?: string },
|
||||
): Promise<void> {
|
||||
const dialog = workspaceSetupDialog(page);
|
||||
await dialog.getByRole("button", { name: /Terminal Agent/i }).click();
|
||||
|
||||
const providerButton = dialog.getByRole("button", { name: new RegExp(`^${input.providerLabel}$`, "i") }).first();
|
||||
await expect(providerButton).toBeVisible({ timeout: 15_000 });
|
||||
await providerButton.click();
|
||||
|
||||
if (input.prompt) {
|
||||
const promptInput = dialog.getByPlaceholder("Optional").first();
|
||||
await expect(promptInput).toBeVisible({ timeout: 15_000 });
|
||||
await promptInput.fill(input.prompt);
|
||||
}
|
||||
|
||||
await dialog.getByRole("button", { name: "Launch" }).click();
|
||||
}
|
||||
|
||||
export async function createStandaloneTerminalFromWorkspaceSetup(page: Page): Promise<void> {
|
||||
await workspaceSetupDialog(page)
|
||||
.getByRole("button", { name: /^Terminal Create the workspace/i })
|
||||
|
||||
Reference in New Issue
Block a user