mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat: add API settings page for managing providers, endpoints, cache, model pools, and CLI settings
feat: implement semantic install dialog for CodexLens with GPU mode selection feat: add radio group component for GPU mode selection feat: update navigation and localization for API settings and semantic install
This commit is contained in:
@@ -748,6 +748,11 @@ async function executeCliTool(
|
||||
conversationId = `${Date.now()}-${tool}`;
|
||||
}
|
||||
|
||||
// Generate transaction ID for concurrent session disambiguation
|
||||
// This will be injected into the prompt for exact session matching during resume
|
||||
const transactionId = generateTransactionId(conversationId);
|
||||
debugLog('TX_ID', `Generated transaction ID: ${transactionId}`, { conversationId });
|
||||
|
||||
// Determine resume strategy (native vs prompt-concat vs hybrid)
|
||||
let resumeDecision: ResumeDecision | null = null;
|
||||
let nativeResumeConfig: NativeResumeConfig | undefined;
|
||||
@@ -811,6 +816,11 @@ async function executeCliTool(
|
||||
}
|
||||
}
|
||||
|
||||
// Inject transaction ID at the start of the final prompt for session tracking
|
||||
// This enables exact session matching during parallel execution scenarios
|
||||
finalPrompt = injectTransactionId(finalPrompt, transactionId);
|
||||
debugLog('TX_ID', `Injected transaction ID into prompt`, { transactionId, promptLength: finalPrompt.length });
|
||||
|
||||
// Check tool availability
|
||||
const toolStatus = await checkToolAvailability(tool);
|
||||
if (!toolStatus.available) {
|
||||
@@ -1207,11 +1217,11 @@ async function executeCliTool(
|
||||
}
|
||||
|
||||
// Track native session after execution (awaited to prevent process hang)
|
||||
// Pass prompt for precise matching in parallel execution scenarios
|
||||
// Pass prompt and transactionId for precise matching in parallel execution scenarios
|
||||
try {
|
||||
const nativeSession = await trackNewSession(tool, new Date(startTime), workingDir, prompt);
|
||||
const nativeSession = await trackNewSession(tool, new Date(startTime), workingDir, prompt, transactionId);
|
||||
if (nativeSession) {
|
||||
// Save native session mapping
|
||||
// Save native session mapping with transaction ID
|
||||
try {
|
||||
store.saveNativeSessionMapping({
|
||||
ccw_id: conversationId,
|
||||
@@ -1219,6 +1229,7 @@ async function executeCliTool(
|
||||
native_session_id: nativeSession.sessionId,
|
||||
native_session_path: nativeSession.filePath,
|
||||
project_hash: nativeSession.projectHash,
|
||||
transaction_id: transactionId,
|
||||
created_at: new Date().toISOString()
|
||||
});
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user