@d3ara1n/pi-editor-shell 0.7.1 → 0.8.1
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 +1 -1
- package/src/config.ts +1 -7
- package/src/index.ts +4 -0
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* "project wins" design, no field-level merging.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { getAgentDir } from "@earendil-works/pi-coding-agent";
|
|
9
10
|
import * as fs from "node:fs";
|
|
10
|
-
import * as os from "node:os";
|
|
11
11
|
import * as path from "node:path";
|
|
12
12
|
|
|
13
13
|
/** Border icon slots that users can override. Each holds a single glyph
|
|
@@ -72,12 +72,6 @@ export const DEFAULT_CONFIG: EditorShellConfig = {
|
|
|
72
72
|
modelDisplay: "name",
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
-
function getAgentDir(): string {
|
|
76
|
-
const envDir = process.env.PI_AGENT_DIR;
|
|
77
|
-
if (envDir) return envDir;
|
|
78
|
-
return path.join(os.homedir(), ".pi", "agent");
|
|
79
|
-
}
|
|
80
|
-
|
|
81
75
|
/** Read the `editorShell` block from a settings file.
|
|
82
76
|
* Returns undefined on missing file / parse error / non-object value —
|
|
83
77
|
* pi surfaces its own settings errors, this loader stays lenient. */
|
package/src/index.ts
CHANGED
|
@@ -413,6 +413,10 @@ export default function (pi: ExtensionAPI) {
|
|
|
413
413
|
pi.registerCommand("editor-shell:status", {
|
|
414
414
|
description: "Show editor-shell debug state: status keys, pinned config, cache totals",
|
|
415
415
|
handler: async (_args, ctx) => {
|
|
416
|
+
// Refresh git dirty first so the status output reflects the current
|
|
417
|
+
// working tree — the event-driven cache is otherwise only updated at
|
|
418
|
+
// session_start / turn_end (see refreshGitDirty).
|
|
419
|
+
await new Promise<void>((resolve) => refreshGitDirty(ctx.cwd, resolve));
|
|
416
420
|
const lines: string[] = [];
|
|
417
421
|
|
|
418
422
|
lines.push("[editor-shell config]");
|