Auto sync connectai

This commit is contained in:
2026-05-19 19:06:06 +09:00
parent 2e2ad36ea9
commit 59e0139bbe
9 changed files with 47 additions and 17 deletions
+4
View File
@@ -1,4 +1,5 @@
import * as vscode from 'vscode';
import { logInfo } from '../../utils';
import { bridgeFetch, getBridgeBaseUrl } from './bridgeClient';
/**
@@ -53,6 +54,7 @@ export async function handleSlashCommand(
const head = (spaceIdx === -1 ? trimmed : trimmed.slice(0, spaceIdx)).toLowerCase() as SlashCommand;
const arg = spaceIdx === -1 ? '' : trimmed.slice(spaceIdx + 1).trim();
logInfo(`[SLASH] handleSlashCommand start head=${head} arg="${arg.slice(0, 60)}" bridge=${getBridgeBaseUrl()}`);
chunk(view, `\n\n**📻 Datacollect Radio** · \`${head}\` · bridge=\`${getBridgeBaseUrl()}\`\n\n`);
try {
@@ -64,11 +66,13 @@ export async function handleSlashCommand(
}
return true;
} catch (e: any) {
logInfo(`[SLASH] handleSlashCommand error head=${head}: ${e?.message || String(e)}`);
chunk(view, `\n\n> ❌ **에러**: ${e?.message || String(e)}\n`);
return true;
} finally {
// input 잠금 해제 — slashRouter 진입했으면 어떤 경로든 반드시 통과.
view?.postMessage({ type: 'streamEnd' });
logInfo(`[SLASH] handleSlashCommand finished head=${head} streamEnd posted`);
}
}