refactor(CAD): 337-6 가 끝 몫 — 옛 OFFSET · LENGTHEN · 옛 꼴 통과 지움 · ALL · L · P 실제 고름 시험 · 안내 글

- transform-acad: 고르기 물음 ALL · L · P = 「n개를 찾음, 총 m개」 · 다시 「객체 선택:」 · 빈 Enter = 고르기 끝(설계 1-4 · 2-15)
- transform-tools: 안 쓰는 옛 OFFSET · LENGTHEN 머신 지움(새 offset-tool · lengthen-tool 이 대신)
- prompt-input · prompt · sequence-tool: 옛 꼴 통과(meta.options 글 배열 · TEXT_INPUT 대문자 통과 · chainFromLastPoint) 지움
- prompt-contract: 옛 꼴 안 쓰는지 지키는 시험 더함
- 안내 글(설계 4 장 끝): 오른쪽 단추 · 휠 두 번 · CAD 키 줄

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QfHKQs7J3hQELKMWQMUJEy
This commit is contained in:
2026-10-16 00:34:02 +09:00
co-authored by Claude Opus 5.5
parent 746c70fcce
commit 933c4c5d71
7 changed files with 39 additions and 85 deletions
@@ -147,14 +147,12 @@ export interface CurrentPrompt {
spec: PromptSpec | null;
/** 그린 한 줄(새 꼴) 또는 옛 instructions */
line: string | null;
/** 옛 꼴 — 점 물음이 받는 옵션 글자 */
legacyOptions: string[];
}
export function currentPrompt(): CurrentPrompt {
const sub = subPrompt();
if (sub) {
return { kind: sub.kind, spec: sub.prompt, line: renderPrompt(sub.prompt, sub.kind), legacyOptions: [] };
return { kind: sub.kind, spec: sub.prompt, line: renderPrompt(sub.prompt, sub.kind) };
}
const meta = activeMeta();
const spec = resolvePrompt(meta?.prompt, activeSnapshot()?.context);
@@ -163,7 +161,6 @@ export function currentPrompt(): CurrentPrompt {
kind,
spec,
line: spec ? renderPrompt(spec, meta?.kind) : (meta?.instructions ?? null),
legacyOptions: meta?.options ?? [],
};
}
@@ -276,12 +273,6 @@ function numberProblem(value: number, rule: PromptSpec['number']): string | null
// ---- 사다리(설계 2-5) ----
/** 옛 꼴 통과 — 새 물음이 없는 상태가 TEXT_INPUT 을 받고 숫자는 안 받음 */
const legacyTakesText = (): boolean => {
const on = (flatConfig()?.on ?? {}) as Record<string, unknown>;
return !!on.TEXT_INPUT && !on.NUMBER_INPUT;
};
/** ② 빈 Enter · Space · 우클릭 */
function routeEmpty(prompt: CurrentPrompt) {
const lockedLength = getLockedLength();
@@ -400,17 +391,8 @@ export function routeTyped(raw: string): void {
notice(`「${hit.absent.label}(${hit.absent.kw})」 옵션은 이 CAD 에 없음.`);
return;
}
const upper = normalizeKeyword(text);
if (!prompt.spec && prompt.legacyOptions.includes(upper)) {
send({ type: ActorEvent.TEXT_INPUT, value: upper }); // 옛 꼴 통과
return;
}
if (prompt.kind === 'point') return routePointText(text, prompt);
if (prompt.kind === 'number') return routeNumber(text, prompt);
if (!prompt.spec && legacyTakesText()) {
send({ type: ActorEvent.TEXT_INPUT, value: upper }); // 옛 꼴 통과
return;
}
reject(prompt); // ⑦ ⑩
}