poe-code 4.0.50 → 4.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { formatPlanReadinessLabel } from "@poe-code/agent-harness-tools";
|
|
3
3
|
import { normalizeExplorerConfig } from "toolcraft-design";
|
|
4
|
-
import { archivePlan, deletePlan, editFile, restorePlanFromLater, savePlanForLater, setPlanReadiness } from "./actions.js";
|
|
4
|
+
import { archivePlan, deletePlan, editFile, restorePlanFromLater, savePlanForLater, setPlanReadiness, unarchivePlan } from "./actions.js";
|
|
5
5
|
import { loadPlanPreviewMarkdown } from "./format.js";
|
|
6
6
|
export function buildPlanExplorerConfig(options) {
|
|
7
7
|
const loadDetailMarkdown = options.loadDetailMarkdown ?? loadPlanPreviewMarkdown;
|
|
@@ -108,6 +108,22 @@ export function buildPlanExplorerConfig(options) {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
|
+
{
|
|
112
|
+
id: "unarchive",
|
|
113
|
+
accelerator: "a",
|
|
114
|
+
label: "Unarchive",
|
|
115
|
+
handler: async (ctx) => {
|
|
116
|
+
const entry = getEntry(entryByRowId, ctx.row.id);
|
|
117
|
+
await unarchivePlan(entry, options.fs);
|
|
118
|
+
try {
|
|
119
|
+
await ctx.refresh();
|
|
120
|
+
ctx.toast(`Unarchived ${path.basename(entry.path)}`, "info");
|
|
121
|
+
}
|
|
122
|
+
catch {
|
|
123
|
+
ctx.toast(`Unarchived ${path.basename(entry.path)}; refresh failed`, "info");
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
111
127
|
{
|
|
112
128
|
id: "delete",
|
|
113
129
|
accelerator: "x",
|
|
@@ -155,8 +171,8 @@ export function buildPlanExplorerConfig(options) {
|
|
|
155
171
|
],
|
|
156
172
|
refresh,
|
|
157
173
|
actions: options.archived
|
|
158
|
-
? actions.filter((action) => action.id === "edit" || action.id === "delete")
|
|
159
|
-
: actions,
|
|
174
|
+
? actions.filter((action) => action.id === "edit" || action.id === "unarchive" || action.id === "delete")
|
|
175
|
+
: actions.filter((action) => action.id !== "unarchive"),
|
|
160
176
|
...(options.archived
|
|
161
177
|
? {}
|
|
162
178
|
: {
|