mirror of
https://github.com/wassname/pi-lgtm.git
synced 2026-06-27 17:01:35 +08:00
v0.3.2
This commit is contained in:
+7
-1
@@ -5,13 +5,18 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.3.2] - 2026-03-17
|
||||
|
||||
### Fixed
|
||||
- **Completed tasks no longer vanish from the list** — completed tasks are now persisted to disk so they survive reloads and show as strikethrough instead of disappearing. Use "Clear completed" in `/tasks` to explicitly remove them.
|
||||
|
||||
## [0.3.1] - 2026-03-16
|
||||
|
||||
### Added
|
||||
- **Local-by-default task persistence** — tasks now auto-persist to `<cwd>/.pi/tasks/tasks.json` on every mutation and reload on restart. No config needed. Set `PI_TASKS=off` to opt out (CI/automation).
|
||||
- **Settings persistence** — `persistTasks` and `autoCascade` settings survive restarts via `<cwd>/.pi/tasks-config.json`.
|
||||
- **"Persist tasks" toggle in Settings** — `/tasks` → Settings now shows two toggles: auto-execute and persist. Both are saved immediately to `tasks-config.json`.
|
||||
- **Completed tasks excluded from disk** — only `pending` and `in_progress` tasks are written to disk. Completed tasks are in-memory only and pruned on restart.
|
||||
- **Completed tasks excluded from disk** — only `pending` and `in_progress` tasks are written to disk. Completed tasks are in-memory only and pruned on restart. *(Reverted in 0.3.2 — completed tasks are now persisted.)*
|
||||
- **Absolute path support** — `TaskStore` now accepts an absolute file path in addition to a short list ID.
|
||||
|
||||
### Changed
|
||||
@@ -68,6 +73,7 @@ Initial release — Claude Code-style task tracking and coordination for pi.
|
||||
- **Background process tracker** — output buffering (stdout + stderr), waiter notification, graceful stop with timeout escalation (SIGTERM → 5s → SIGKILL).
|
||||
- **78 unit tests** — task store CRUD, dependencies, warnings, file persistence; widget rendering, icons, spinners, token/duration formatting; process tracker lifecycle.
|
||||
|
||||
[0.3.2]: https://github.com/tintinweb/pi-tasks/releases/tag/v0.3.2
|
||||
[0.3.1]: https://github.com/tintinweb/pi-tasks/releases/tag/v0.3.1
|
||||
[0.3.0]: https://github.com/tintinweb/pi-tasks/releases/tag/v0.3.0
|
||||
[0.2.0]: https://github.com/tintinweb/pi-tasks/releases/tag/v0.2.0
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@tintinweb/pi-tasks",
|
||||
"version": "0.3.1",
|
||||
"version": "0.3.2",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@tintinweb/pi-tasks",
|
||||
"version": "0.3.1",
|
||||
"version": "0.3.2",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@mariozechner/pi-coding-agent": "^0.57.1",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tintinweb/pi-tasks",
|
||||
"version": "0.3.1",
|
||||
"version": "0.3.2",
|
||||
"description": "A pi extension that brings Claude Code-style task tracking and coordination to pi.",
|
||||
"author": "tintinweb",
|
||||
"license": "MIT",
|
||||
|
||||
+9
-1
@@ -210,7 +210,15 @@ export default function (pi: ExtensionAPI) {
|
||||
};
|
||||
});
|
||||
|
||||
// Grab UI + extension context from every tool execution
|
||||
// Grab UI context early — before_agent_start fires before any tool calls,
|
||||
// so persisted tasks show up immediately on session resume.
|
||||
pi.on("before_agent_start", async (_event, ctx) => {
|
||||
latestCtx = ctx;
|
||||
widget.setUICtx(ctx.ui as UICtx);
|
||||
if (store.list().length > 0) widget.update();
|
||||
});
|
||||
|
||||
// Keep latestCtx fresh on every tool execution as well.
|
||||
pi.on("tool_execution_start", async (_event, ctx) => {
|
||||
latestCtx = ctx;
|
||||
widget.setUICtx(ctx.ui as UICtx);
|
||||
|
||||
+2
-2
@@ -82,12 +82,12 @@ export class TaskStore {
|
||||
} catch { /* corrupt file — start fresh */ }
|
||||
}
|
||||
|
||||
/** Write store to disk atomically (file-backed mode only). Completed tasks are not persisted. */
|
||||
/** Write store to disk atomically (file-backed mode only). */
|
||||
private save(): void {
|
||||
if (!this.filePath) return;
|
||||
const data: TaskStoreData = {
|
||||
nextId: this.nextId,
|
||||
tasks: Array.from(this.tasks.values()).filter(t => t.status !== "completed"),
|
||||
tasks: Array.from(this.tasks.values()),
|
||||
};
|
||||
const tmpPath = this.filePath + ".tmp";
|
||||
writeFileSync(tmpPath, JSON.stringify(data, null, 2));
|
||||
|
||||
Reference in New Issue
Block a user