v2.2.268-291: /email 통합(브리핑·스캔·워처) + stocks 자동편입·매수알림 + 지식문서·메신저 중앙화
[/email — Gmail + 클래식 Outlook (신규 기능군)]
- 기본 명령: brief(PM 업무 허브 대시보드)·list·read·wikify·reply(Drafts만)·open(Outlook 창 열기)
- Gmail: 자체 OAuth gmail.readonly 스코프 추가 (재연결 1회 필요) / Outlook: COM(PowerShell), 전 계정(Store)·하위 폴더(120개 가드) 수집, To/CC 판별
- 브리핑: 상태 3분류(결정/회신/확인만)·P등급 영향·프로젝트 위험도·Today Focus·오늘 완료 예상·기간 명시 시 표시 범위 제한
- 영속 상태(email_state.json): 회신대기/공넘김 상태머신, 창 밖 미회신 보존, done old N 일괄정리
- 워처: 주기 자동 수집 + 미회신 임계 알림(기본 끔) + 데일리 브리핑 '답할 이메일' 섹션
- 전체 스캔(/email scan): 자동 위키화(회차 15건·레지스트리·파일삭제 감지 재생성)·진행 표시(streamProgress)
- 자동발신 필터 확장(Confluence·AWS·광고·[Notification]) + 라벨 오타 후처리(polishBriefLabels)
[/stocks]
- discover 자동 편입(stocks.json) + 매수권장가 224일선 자동 산출
- 매수사정권 진입 전이 감지 → 텔레그램 1회 알림 (직전신호 추적)
- 버그 수정: '미충족'이 .includes('충족')에 오탐되던 필터 판정
[지식 문서 파이프라인 통일 (wikiFormat/wikiSave)]
- PC 로컬 직접 저장 (NAS 볼륨 미아 문제 해소) — 설정 폴더 → 두뇌 → 워크스페이스
- 이메일 전용 Email_Wiki 분리(email.wikifySavePath) + 봉투(frontmatter) 자동 통일
- 정본 프롬프트 단일 빌더(buildKnowledgeWikiPrompt) — web/email 래퍼화, 템플릿 fetch 일원화
- 이메일 문서 시점 3중 방어: 기준시점 헤더·제목=메일 최신일·날짜 없는 현재형 금지
- docs/WIKI_DOC_PIPELINE.md 개발 규약
[텔레그램 메신저 중앙화 (messageFormat)]
- 단일 렌더러 renderTelegram — 5개 발신 빌더(주식보고·매수시그널·Top5·데일리·미회신) 통일
- 주식 보고 시각 하드코딩 제거(messenger.stocksReportTimes CSV) + 알림 토글 2종
- 설정 패널 '메신저' 탭 신설 · '이메일' 토글 섹션(Gmail/Outlook on/off)
테스트 803개 통과 (이메일 상태머신·CC판별·포맷·매수전이·봉투 등 60+ 신규)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -585,6 +585,29 @@ async function cmdDiscover(rest: string, view: Webview | undefined, context?: vs
|
||||
chunk(view, ` 통과 (${c.passedKeywords.length}): ${c.passedKeywords.join(', ')}\n\n`);
|
||||
}
|
||||
|
||||
// ── 워치리스트 자동 편입 (v2.2.268, g1nation.stocks.discoverAutoAdd 기본 ON) ──
|
||||
// 발굴 후보를 stocks.json 에 자동 추가 — 매수권장가(224일선 기반)까지 자동 설정돼
|
||||
// 워처가 매수사정권 진입을 감시할 수 있는 상태로 편입. 기존 심볼은 건드리지 않음
|
||||
// (사용자가 수동으로 다듬은 매수권장가·특이사항 보존).
|
||||
const autoAdd = vscode.workspace.getConfiguration('g1nation').get<boolean>('stocks.discoverAutoAdd', true);
|
||||
if (autoAdd) {
|
||||
const store = readStocksStore();
|
||||
const existing = new Set(store.map(s => s.심볼));
|
||||
const fresh = candidates.filter(c => !existing.has(c.symbol));
|
||||
if (fresh.length > 0) {
|
||||
store.push(...fresh.map(c => c.asStock));
|
||||
if (writeStocksStore(store)) {
|
||||
const withRec = fresh.filter(c => c.asStock.매수권장가).length;
|
||||
chunk(view, `\n📥 **워치리스트 자동 편입**: 신규 ${fresh.length}개 추가 (기존 ${candidates.length - fresh.length}개 스킵) · 매수권장가 자동 설정 ${withRec}개 (224일선 기반)\n`);
|
||||
chunk(view, ` → 워처(09:00/15:00 KST)가 매수사정권 진입 시 텔레그램으로 알립니다.\n`);
|
||||
} else {
|
||||
chunk(view, `\n⚠️ 자동 편입 실패 — stocks.json 쓰기 불가 (워크스페이스 확인).\n`);
|
||||
}
|
||||
} else {
|
||||
chunk(view, `\n📥 자동 편입: 후보 전원이 이미 워치리스트에 있어 추가 없음.\n`);
|
||||
}
|
||||
}
|
||||
|
||||
// ── LLM 매력도 분석 + 텔레그램 전송 (자동 chain) ──
|
||||
// 사용자 의도: 발굴 목록이 나오면 *항상* 분석 + 텔레그램. 별도 명령 trigger 불필요.
|
||||
// 실패해도 (LLM timeout / 텔레그램 미설정) 위 발굴 목록은 화면에 그대로 남아 있음.
|
||||
@@ -592,7 +615,10 @@ async function cmdDiscover(rest: string, view: Webview | undefined, context?: vs
|
||||
const topFive = await analyzeTopCandidates(candidates, (msg) => chunk(view, msg + '\n'));
|
||||
chunk(view, renderTopFiveForChat(topFive));
|
||||
|
||||
if (context) {
|
||||
const tgTopFiveOn = vscode.workspace.getConfiguration('g1nation').get<boolean>('messenger.discoverTopFive', true) !== false;
|
||||
if (!tgTopFiveOn) {
|
||||
// 텔레그램 발송 꺼짐 (Settings → 메신저) — 채팅 표시는 위에서 이미 완료.
|
||||
} else if (context) {
|
||||
const rangeLabel = `시총 ${minCap.toLocaleString()}-${maxCap.toLocaleString()}억${sectorGroup ? ` · ${sectorGroup.key}` : ''}`;
|
||||
const tgText = renderTopFiveForTelegram(topFive, rangeLabel);
|
||||
const tgResult = await sendTopFiveToTelegram(context, tgText);
|
||||
@@ -603,7 +629,7 @@ async function cmdDiscover(rest: string, view: Webview | undefined, context?: vs
|
||||
chunk(view, '\n⚠️ 텔레그램 발송 skip: ExtensionContext 없음.\n');
|
||||
}
|
||||
|
||||
chunk(view, '\n💡 종목을 stocks.json 에 추가하려면 `/stocks add <심볼> <이름>` 사용.\n');
|
||||
chunk(view, '\n💡 후보는 워치리스트에 자동 편입됨 (`g1nation.stocks.discoverAutoAdd` 로 끄기 가능). 제거는 `/stocks remove <심볼>`.\n');
|
||||
}
|
||||
|
||||
function cmdPath(view: Webview | undefined): void {
|
||||
|
||||
Reference in New Issue
Block a user