release: v2.0.1 - Advanced Knowledge Mix & Architectural Intelligence

This commit is contained in:
g1nation
2026-05-13 22:05:39 +09:00
parent c32b17377b
commit e85e11aac6
23 changed files with 1758 additions and 78 deletions
+20
View File
@@ -75,6 +75,26 @@ export function buildApiUrl(baseUrl: string, engine: EngineKind, endpoint: 'mode
return `${apiRoot}/chat`;
}
/**
* Open a file in the editor and keep ConnectAI's sidebar (typically ViewColumn.Three)
* undisturbed. Markdown records, wiki docs, agent skill files, knowledge-map JSON,
* lessons — all should land in the *editor* area (group 2), never in the sidebar group.
*
* Falls back to whatever ViewColumn ends up being default if `Two` is unavailable
* (VS Code creates the column on demand when one doesn't exist yet).
*/
export async function openInEditorGroup(
target: string | vscode.Uri,
options: { preview?: boolean } = {}
): Promise<vscode.TextEditor> {
const uri = typeof target === 'string' ? vscode.Uri.file(target) : target;
const doc = await vscode.workspace.openTextDocument(uri);
return vscode.window.showTextDocument(doc, {
viewColumn: vscode.ViewColumn.Two,
preview: options.preview ?? false,
});
}
export function summarizeText(text: string, maxLength: number = 400): string {
const normalized = text.replace(/\s+/g, ' ').trim();
if (normalized.length <= maxLength) return normalized;