refactor(M02): 새 항목 일위대가 고르기 없앰 — 항목 추가 창 줄 · pickCombo · 서버가 받는 일위대가 키 · 열 칸 새로 쓰기 · /combos/all · fetchUsableCombos 지움 · 새 구조물 일위대가 = 빈 labor 문서(39-1d)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013rJwJMVL4EE31y77TB11AP
This commit is contained in:
@@ -82,8 +82,6 @@ export interface TreePanelOptions {
|
||||
dest: string[],
|
||||
) => Promise<TreeView>;
|
||||
};
|
||||
/** 항목 추가 창의 일위대가 고르기(PLAN 31-2 · 세 층 조합 · 찾기 AND) — 없으면 그 줄 없음 */
|
||||
pickCombo?: () => Promise<{ key: string; label: string } | null>;
|
||||
/** 「〇〇로 복사…」 — 그 층 폴더를 골라 바로(층을 안 바꿈 · `label` 의 {n} = 개수 · `api.paste` 로 · 39-6) */
|
||||
copyTo?: CopyTarget[];
|
||||
/** 이 층을 고칠 수 있나 — 아니면 메뉴 · 키 없음 */
|
||||
@@ -465,22 +463,14 @@ export function createTreePanel(opt: TreePanelOptions): TreePanelHandle {
|
||||
|
||||
async function addItem(parent: string[]): Promise<void> {
|
||||
if (!(await ready())) return;
|
||||
// 종류(맨 위 폴더 · 고른 폴더면 그 안) + 이름 + 일위대가 · 단위 안 받음(PLAN 31-2)
|
||||
// 종류(맨 위 폴더 · 고른 폴더면 그 안) + 이름 · 단위 안 받음(PLAN 31-2) · 일위대가 = 빈 문서(39-1d)
|
||||
const kinds = view ? buildFolders(view).folders.map((f) => f.path[0]) : [];
|
||||
const got = await askNewItem({
|
||||
title: L("M02_TreeAddItem"),
|
||||
kinds,
|
||||
at: parent,
|
||||
pickCombo: opt.pickCombo,
|
||||
});
|
||||
if (got) {
|
||||
await edit({
|
||||
op: "add-item",
|
||||
경로: got.path,
|
||||
이름: got.name,
|
||||
...(got.combo ? { 일위대가: got.combo } : {}),
|
||||
});
|
||||
}
|
||||
if (got) await edit({ op: "add-item", 경로: got.path, 이름: got.name });
|
||||
}
|
||||
|
||||
async function rename(target: Target): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user