feat: workspace→session picker and /model switch (v0.3.0)

Align Telegram session list with Web via apiProxy (exclude archived), resume cold sessions on bind, and allow model selection from the phone.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
owo
2026-08-14 18:46:56 +08:00
co-authored by Cursor
parent 9bae1a3702
commit ef0e7f34e3
18 changed files with 1486 additions and 108 deletions
+30
View File
@@ -0,0 +1,30 @@
import type { Context } from '@deepseek-ai/cordis';
import type { Agent } from '@deepseek-ai/dsh-agent';
export interface WorkspaceRow {
id: string;
title: string;
path: string;
sessionIds: string[];
}
export interface SessionRow {
sessionId: string;
title: string;
cwd?: string;
blank: boolean;
running: boolean;
origin?: string;
updatedAt: number;
}
export interface CatalogSnapshot {
workspaces: WorkspaceRow[];
sessionsById: Map<string, SessionRow>;
archivedIds: Set<string>;
}
/** Load workspaces + sessions aligned with Web UI (via apiProxy when available). */
export declare function loadCatalog(ctx: Context): Promise<CatalogSnapshot | undefined>;
/** Sessions visible under one workspace (Web-like filters). */
export declare function visibleSessionsForWorkspace(catalog: CatalogSnapshot, workspace: WorkspaceRow): SessionRow[];
export declare function workspacesWithVisibleSessions(catalog: CatalogSnapshot): WorkspaceRow[];
export declare function truncateButton(text: string, max?: number): string;
/** Fallback when apiProxy is unavailable: group live agents by cwd. */
export declare function catalogFromLiveAgents(agents: Agent[], ctx?: Context): CatalogSnapshot;