feat(commands): multi-select ordered command pipeline with step reordering and single-pass composition (AI-05, AI-07)

This commit is contained in:
Yun Chan 2026-10-31 02:54:54 +09:00
parent f49acf0105
commit 10af20a0ad
157 changed files with 29455 additions and 913 deletions

View file

@ -153,18 +153,12 @@ export function isWordBoundaryKey(keyClass: KeyStrokeClass): boolean {
/**
* 단어 수.
*
* 공백 분리 토큰 중 문자/숫자/CJK 를 포함한 것만 센다.
* (중국어처럼 공백이 없는 언어는 과소 집계된다 — 활동 통계 전용. 학습 필터는
* text-segmentation.ts 의 countLexicalWords 로 센다)
* 공백 분리 언어(한국어·라틴 문자 등)는 공백 분리 토큰 중 문자/숫자를 포함한 것만 세고,
* 띄어쓰기 없이 쓰는 문자 체계(중국어·일본어·태국어 등)는 `countLexicalWords`(Intl.Segmenter
* 또는 글자 수 어림)로 분할해 과소 집계를 방지한다.
*/
export function countWords(text: string): number {
if (!text) return 0
const tokens = text.split(/\s+/)
let count = 0
for (const token of tokens) {
if (/[\p{L}\p{N}]/u.test(token)) count += 1
}
return count
return countLexicalWords(text)
}
/** 문장 수 — 종결 부호 + 개행 기준. */