Bump version to 2.2.27 and update package
This commit is contained in:
@@ -18,26 +18,6 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
|
||||
case 'promptWithFile':
|
||||
provider._lmStudio?.activity.bump();
|
||||
await provider._context.globalState.update(SidebarChatProvider.blankChatStateKey, false);
|
||||
// ── YouTube 자막 추출 키워드 감지 ──
|
||||
// "이 채널/영상 자막 추출"·"유튜브 스크립트 다운로드" 같은 발화에
|
||||
// YouTube URL이 같이 있으면 자동으로 추출 wizard 진입. 회사 모드
|
||||
// 분기 *전*에 둬서 일반 채팅 / 회사 모드 둘 다에서 작동. 키워드만
|
||||
// 있고 URL이 없으면 URL을 비워둔 wizard로 — 사용자가 다이얼로그에
|
||||
// 직접 입력.
|
||||
if (typeof data.value === 'string') {
|
||||
const text = data.value;
|
||||
const intent = /(?:유튜브|youtube|yt)/i.test(text)
|
||||
&& /(?:자막|스크립트|transcript|caption|subtitle|추출|다운로드|받아|모아|수집|가져)/i.test(text);
|
||||
if (intent) {
|
||||
const urlMatch = text.match(/https?:\/\/(?:www\.|m\.)?(?:youtube\.com|youtu\.be)\/\S+/i);
|
||||
const userMsg = urlMatch
|
||||
? `🎬 YouTube 자막 추출 wizard를 엽니다. (감지된 URL: ${urlMatch[0]})`
|
||||
: '🎬 YouTube 자막 추출 wizard를 엽니다. URL을 직접 입력하세요.';
|
||||
provider._view?.webview.postMessage({ type: 'addMessage', role: 'assistant', value: userMsg });
|
||||
await vscode.commands.executeCommand('g1nation.youtube.extractTranscripts', { url: urlMatch?.[0] });
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// ── 1인 기업 모드 우선 분기 ──
|
||||
// 회사 모드일 땐 들어온 메시지를 intent classifier에 한 번 통과시켜
|
||||
// (a) 잡담/질문/짧은 응답 → 일반 채팅 경로, (b) 후속 대화 → 일반 채팅
|
||||
@@ -281,12 +261,6 @@ export async function handleChatMessage(provider: SidebarChatProvider, data: any
|
||||
case 'addMessage':
|
||||
provider._view?.webview.postMessage({ type: 'addMessage', role: data.role, value: data.value, rationale: data.rationale });
|
||||
return true;
|
||||
case 'extractYoutubeTranscripts':
|
||||
// 사이드바 도구 메뉴의 ▶ YouTube 자막 추출 버튼 → wizard 진입.
|
||||
// 명령 자체는 extension.ts에 등록돼 있어 wizard가 VS Code dialog로
|
||||
// URL/폴더/언어/limit을 물어보고 Python을 spawn.
|
||||
await vscode.commands.executeCommand('g1nation.youtube.extractTranscripts', { url: typeof data.url === 'string' ? data.url : undefined });
|
||||
return true;
|
||||
case 'refreshModels':
|
||||
await provider._sendModels(true);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user