合并远程主分支客户端收口

This commit is contained in:
2026-08-13 17:13:36 +08:00
240 changed files with 4900 additions and 20399 deletions

View File

@@ -1,13 +0,0 @@
export type DevicePreviewState = 'not_deployed' | 'building' | 'ready' | 'unavailable';
export type DevicePreviewSnapshot = {
state: DevicePreviewState;
projectId: string;
message: string;
appId?: string;
versionId?: string;
versionName?: string;
reviewStatus?: string;
launchUrl?: string;
updatedAt?: string;
};

View File

@@ -37,7 +37,6 @@ export type ProjectConfig = {
schemaVersion: 1;
projectType: ProjectType;
initialized: boolean;
superpowersEnabled: boolean;
defaultModel: string | null;
agents: ProjectAgentConfig[];
knowledgeDirectory: 'knowledge';
@@ -53,7 +52,6 @@ export function createProjectConfig(
schemaVersion: 1,
projectType,
initialized: false,
superpowersEnabled: false,
defaultModel: null,
agents: [],
knowledgeDirectory: 'knowledge',

View File

@@ -105,6 +105,25 @@ export function patchProjectSessionMetadata(
return { schemaVersion: 1, sessions, updatedAt: now };
}
/**
* Reading a session changes its unread state, not its activity timestamp.
* Keeping those concerns separate prevents a navigation click from moving an
* Agent in a list that is ordered by the latest conversation activity.
*/
export function markProjectSessionRead(
state: ProjectConversationState,
sessionId: string,
now = new Date().toISOString(),
): ProjectConversationState {
return {
schemaVersion: 1,
sessions: state.sessions.map((item) => item.sessionId === sessionId
? { ...item, unreadCount: 0 }
: item),
updatedAt: now,
};
}
export function removeProjectSessionMetadata(
state: ProjectConversationState,
sessionId: string,