mirror of
https://github.com/wassname/pi-lgtm.git
synced 2026-09-12 12:50:22 +08:00
v0.3.3
This commit is contained in:
+13
-12
@@ -28,6 +28,17 @@ export async function openSettingsMenu(
|
||||
): Promise<void> {
|
||||
await ui.custom((_tui, theme, _kb, done) => {
|
||||
const items: SettingItem[] = [
|
||||
{
|
||||
id: "taskScope",
|
||||
label: "Task storage",
|
||||
description:
|
||||
"memory: tasks live only in memory, lost when session ends. " +
|
||||
"session: persisted per session (tasks-<sessionId>.json), survives resume. " +
|
||||
"project: shared across all sessions (tasks.json). " +
|
||||
"Takes effect on next session start.",
|
||||
currentValue: cfg.taskScope ?? "session",
|
||||
values: ["memory", "session", "project"],
|
||||
},
|
||||
{
|
||||
id: "autoCascade",
|
||||
label: "Auto-execute with agents",
|
||||
@@ -37,16 +48,6 @@ export async function openSettingsMenu(
|
||||
currentValue: (cfg.autoCascade ?? false) ? "on" : "off",
|
||||
values: ["on", "off"],
|
||||
},
|
||||
{
|
||||
id: "persist",
|
||||
label: "Persist tasks across sessions",
|
||||
description:
|
||||
"When ON: pending and in-progress tasks are saved to .pi/tasks/tasks.json so they " +
|
||||
"survive a restart. Completed tasks are never written to disk. " +
|
||||
"Toggle takes effect on next session start.",
|
||||
currentValue: (cfg.persistTasks ?? true) ? "on" : "off",
|
||||
values: ["on", "off"],
|
||||
},
|
||||
];
|
||||
|
||||
const list = new SettingsList(
|
||||
@@ -58,8 +59,8 @@ export async function openSettingsMenu(
|
||||
cfg.autoCascade = newValue === "on";
|
||||
saveTasksConfig(cfg);
|
||||
}
|
||||
if (id === "persist") {
|
||||
cfg.persistTasks = newValue === "on";
|
||||
if (id === "taskScope") {
|
||||
cfg.taskScope = newValue as "memory" | "session" | "project";
|
||||
saveTasksConfig(cfg);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -75,6 +75,10 @@ export class TaskWidget {
|
||||
|
||||
constructor(private store: TaskStore) {}
|
||||
|
||||
setStore(store: TaskStore) {
|
||||
this.store = store;
|
||||
}
|
||||
|
||||
setUICtx(ctx: UICtx) {
|
||||
this.uiCtx = ctx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user