chore(integration): snapshot local main worktree
This commit is contained in:
@@ -6,7 +6,6 @@ import {
|
||||
getCodingProjectConfig,
|
||||
listCodingProjectConversations,
|
||||
listCodingProjects,
|
||||
acknowledgeLegacyCodingConversationNotice,
|
||||
openCodingProject,
|
||||
patchCodingProjectConversation,
|
||||
removeCodingProject,
|
||||
@@ -46,11 +45,6 @@ interface CodingWorkspaceDependencies {
|
||||
}): Promise<{ project: CodingProjectSummary; config: CodingProjectConfig; knowledgeFiles: string[] }>;
|
||||
setActiveProject(projectId: string): Promise<CodingProjectSummary>;
|
||||
removeProject(projectId: string): Promise<void>;
|
||||
acknowledgeLegacyNotice(projectId: string): Promise<{
|
||||
project: CodingProjectSummary;
|
||||
config: CodingProjectConfig;
|
||||
knowledgeFiles: string[];
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface CodingWorkspaceState {
|
||||
@@ -74,7 +68,6 @@ export interface CodingWorkspaceState {
|
||||
}): Promise<CodingProjectSummary>;
|
||||
setActiveProject(projectId: string): Promise<CodingProjectSummary>;
|
||||
removeProject(projectId: string): Promise<void>;
|
||||
acknowledgeLegacyNotice(): Promise<void>;
|
||||
selectAgent(agentId: string): void;
|
||||
ensureConversation(agentId: string): Promise<CodingConversationMetadata>;
|
||||
createConversation(agentId: string): Promise<CodingConversationMetadata>;
|
||||
@@ -133,7 +126,6 @@ function defaultDependencies(): CodingWorkspaceDependencies {
|
||||
createProject: createCodingProject,
|
||||
setActiveProject: setActiveCodingProject,
|
||||
removeProject: removeCodingProject,
|
||||
acknowledgeLegacyNotice: acknowledgeLegacyCodingConversationNotice,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -235,13 +227,6 @@ export function createCodingWorkspaceStore(
|
||||
await get().load();
|
||||
},
|
||||
|
||||
async acknowledgeLegacyNotice() {
|
||||
const projectId = get().activeProjectId;
|
||||
if (!projectId) return;
|
||||
const snapshot = await deps.acknowledgeLegacyNotice(projectId);
|
||||
if (get().activeProjectId === projectId) set({ config: snapshot.config });
|
||||
},
|
||||
|
||||
selectAgent(agentId) {
|
||||
if (!enabledAgent(get().config, agentId)) return;
|
||||
set({ selectedAgentId: agentId });
|
||||
@@ -256,7 +241,7 @@ export function createCodingWorkspaceStore(
|
||||
async createConversation(agentId) {
|
||||
const state = get();
|
||||
if (!state.activeProject || !enabledAgent(state.config, agentId)) {
|
||||
throw new Error('当前项目没有可用的伙伴。');
|
||||
throw new Error('当前项目没有可用的智能体。');
|
||||
}
|
||||
const flightKey = `${state.activeProject.id}:${agentId}`;
|
||||
const existingFlight = conversationFlights.get(flightKey);
|
||||
|
||||
Reference in New Issue
Block a user