feat: 支持 AI 设计项目多会话交互

需求:用户可在同一设计项目中新建和切换会话,任务列表保持项目级共享。

实现:
- 增加会话选择、新建入口及本地数据迁移
- Conversation 独立消息、Brief、Quote 与流式状态
- 保留项目任务并修复 Task revision 与 ABA 异步竞态
- 保持 Enter 发送、Shift+Enter 换行及 IME 保护
This commit is contained in:
2026-08-06 18:22:15 +08:00
parent 4980894017
commit 03dae62cf3
18 changed files with 1810 additions and 702 deletions

View File

@@ -32,10 +32,6 @@ import { logger } from '../utils/logger';
import { warmupNetworkOptimization } from '../utils/uv-env';
import { resolvePythonRuntime } from '../utils/python-runtime';
import { initTelemetry } from '../utils/telemetry';
import {
getOrCreateAgentGatewaySessionClientId,
rotateAgentGatewaySessionClientId,
} from '../utils/store';
import { isQuitting, setQuitting } from './app-state';
import { applyProxySettings } from './proxy';
@@ -425,12 +421,7 @@ async function initialize(): Promise<void> {
});
const imageWorkspace = localImageWorkspaceEnabled
? new LocalImageWorkspace({ userDataDir: app.getPath('userData') })
: new WorksSquareDesignWorkspace({
eventSessionClientIdStore: {
getOrCreate: getOrCreateAgentGatewaySessionClientId,
rotate: rotateAgentGatewaySessionClientId,
},
});
: new WorksSquareDesignWorkspace();
imageWorkspaceModule = imageWorkspace;
if (localImageWorkspaceEnabled) {
logger.info('AI painting workspace is using local development storage');