feat: personal notes, each person's standing instructions for how Jarvis answers them
A personalNotes tool (add, list, delete the asker's own notes) offered only with a notes backend. The app keeps the notes in config/notes.json and sends the asker's with every voice, chat and task reply; the reply engine puts them in a <person_notes> fence as that person's preferences, which never permit an action or a tool. The worker's schedule bridge becomes a shared app bridge for schedule_action and note_action. A 사람별 지침 screen edits and deletes any note; features.notes turns the tool and the notes off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -350,6 +350,31 @@ async function permissionsCard() {
|
||||
h("div", { class: "hint" }, "채팅 채널 권한은 \"채팅 채널\" 화면에서 바꿉니다."));
|
||||
}
|
||||
|
||||
/** Each person's standing instructions (admin.spec.md, "Personal notes"): edit or delete any. */
|
||||
function notesScreen() {
|
||||
const list = h("div");
|
||||
const load = async () => {
|
||||
try {
|
||||
const { items } = await api("notes_list");
|
||||
list.replaceChildren(items.length ? h("table", {}, h("tbody", {}, items.map((n) => {
|
||||
const input = h("input", { type: "text", value: n.text, maxlength: 300 });
|
||||
return h("tr", {},
|
||||
h("td", { class: "small" }, n.name, h("div", { class: "small muted" }, n.user)),
|
||||
h("td", {}, input),
|
||||
h("td", {}, h("button", { class: "btn", onclick: async () => {
|
||||
try { await api("note_update", { id: n.id, text: input.value }); toast("저장했습니다"); load(); } catch (e) { fail(e); }
|
||||
} }, "저장"), " ", h("button", { class: "btn", onclick: async () => {
|
||||
try { await api("note_delete", { id: n.id }); toast("지웠습니다"); load(); } catch (e) { fail(e); }
|
||||
} }, "삭제")));
|
||||
}))) : h("div", { class: "muted" }, "저장된 지침이 없습니다. \"앞으로 나한테는 반말로 해\"처럼 말하면 여기에 나옵니다."));
|
||||
} catch (e) { fail(e); }
|
||||
};
|
||||
load();
|
||||
return h("div", {}, h("h1", {}, "사람별 지침"), h("div", { class: "card" },
|
||||
h("div", { class: "hint" }, "사람마다 고쳐 준 답하는 방식입니다. 그 사람에게 답할 때만 넣고, 어떤 동작이나 도구도 허락하지 않습니다. 한 사람에 20개, 하나에 300자까지입니다."),
|
||||
h("div", { class: "field" }, h("button", { class: "btn", onclick: load }, "새로 고침")), list));
|
||||
}
|
||||
|
||||
const ACTIVITY = { "chat.send": "채팅 보내기", "chat.edit": "채팅 고치기", "chat.react": "반응 달기",
|
||||
"chat.delete": "채팅 지우기", "chat.pin": "고정", "chat.unpin": "고정 풀기",
|
||||
"schedule.remind": "예약 알림 전달", "schedule.task": "정기 작업 전달" };
|
||||
@@ -691,6 +716,7 @@ async function show(name) {
|
||||
if (name === "dashboard") { screen.replaceChildren(); await refresh(); ticker = setInterval(refresh, 1000); return; }
|
||||
if (name === "logs") { const l = logsScreen(); screen.replaceChildren(l.view); ticker = setInterval(l.tick, 1000); return; }
|
||||
if (name === "activity") { screen.replaceChildren(activityScreen()); return; }
|
||||
if (name === "notes") { screen.replaceChildren(notesScreen()); return; }
|
||||
if (name === "update") { const u = updateScreen(); screen.replaceChildren(u.view); ticker = setInterval(u.tick, 1000); return; }
|
||||
const titles = { bot: "봇", channels: "채널·호출", chat: "채팅 채널", memory: "대화 기억", model: "모델", features: "기능",
|
||||
collect: "백그라운드 수집", game: "게임 모드", schedule: "예약", pcControl: "PC 제어" };
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
<button data-screen="collect" class="nav">백그라운드 수집</button>
|
||||
<button data-screen="schedule" class="nav">예약</button>
|
||||
<button data-screen="pcControl" class="nav">PC 제어</button>
|
||||
<button data-screen="notes" class="nav">사람별 지침</button>
|
||||
<button data-screen="activity" class="nav">한 일</button>
|
||||
<button data-screen="game" class="nav">게임 모드</button>
|
||||
<button data-screen="logs" class="nav">로그</button>
|
||||
|
||||
Reference in New Issue
Block a user