@oh-my-pi/pi-coding-agent 16.2.3 → 16.2.4
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/CHANGELOG.md +11 -0
- package/dist/cli.js +2671 -2660
- package/dist/types/cli/update-cli.d.ts +15 -0
- package/dist/types/collab/replication-shrink.d.ts +39 -0
- package/dist/types/config/provider-globals.d.ts +7 -0
- package/dist/types/memories/index.d.ts +20 -1
- package/dist/types/modes/components/status-line/component.d.ts +5 -0
- package/dist/types/modes/controllers/command-controller.d.ts +3 -3
- package/dist/types/modes/interactive-mode.d.ts +1 -0
- package/dist/types/modes/types.d.ts +2 -1
- package/dist/types/session/session-manager.d.ts +2 -3
- package/package.json +12 -12
- package/src/autolearn/controller.ts +13 -22
- package/src/cli/update-cli.ts +254 -0
- package/src/collab/host.ts +13 -8
- package/src/collab/replication-shrink.ts +111 -0
- package/src/config/provider-globals.ts +25 -0
- package/src/eval/__tests__/julia-prelude.test.ts +2 -2
- package/src/memories/index.ts +115 -9
- package/src/memory-backend/local-backend.ts +5 -3
- package/src/modes/components/status-line/component.ts +6 -0
- package/src/modes/controllers/command-controller.ts +5 -35
- package/src/modes/controllers/event-controller.ts +7 -1
- package/src/modes/interactive-mode.ts +9 -20
- package/src/modes/types.ts +2 -1
- package/src/prompts/goals/goal-todo-context.md +12 -0
- package/src/session/agent-session.ts +32 -1
- package/src/session/session-manager.ts +2 -3
- package/src/slash-commands/builtin-registry.ts +7 -21
- package/src/prompts/system/autolearn-nudge.md +0 -5
|
@@ -6,6 +6,7 @@ import { type AutocompleteItem, Spacer } from "@oh-my-pi/pi-tui";
|
|
|
6
6
|
import { APP_NAME, getProjectDir, setProjectDir } from "@oh-my-pi/pi-utils";
|
|
7
7
|
import { COLLAB_GUEST_ALLOWED_COMMANDS, CollabGuestLink } from "../collab/guest";
|
|
8
8
|
import { CollabHost } from "../collab/host";
|
|
9
|
+
import { applyProviderGlobalsFromSettings } from "../config/provider-globals";
|
|
9
10
|
import type { SettingPath, SettingValue } from "../config/settings";
|
|
10
11
|
import { settings } from "../config/settings";
|
|
11
12
|
import {
|
|
@@ -29,7 +30,6 @@ import type { InteractiveModeContext } from "../modes/types";
|
|
|
29
30
|
import type { AgentSession, FreshSessionResult } from "../session/agent-session";
|
|
30
31
|
import { COMPACT_MODES, parseCompactArgs } from "../session/compact-modes";
|
|
31
32
|
import { resolveResumableSession } from "../session/session-listing";
|
|
32
|
-
import { SessionManager } from "../session/session-manager";
|
|
33
33
|
import { formatShakeSummary, type ShakeMode } from "../session/shake-types";
|
|
34
34
|
import { expandTilde, resolveToCwd } from "../tools/path-utils";
|
|
35
35
|
import { urlHyperlinkAlways } from "../tui";
|
|
@@ -1606,8 +1606,8 @@ const BUILTIN_SLASH_COMMAND_REGISTRY: ReadonlyArray<SlashCommandSpec> = [
|
|
|
1606
1606
|
},
|
|
1607
1607
|
{
|
|
1608
1608
|
name: "move",
|
|
1609
|
-
description: "
|
|
1610
|
-
acpDescription: "
|
|
1609
|
+
description: "Move the current session to a different directory",
|
|
1610
|
+
acpDescription: "Move the current session to a different directory",
|
|
1611
1611
|
inlineHint: "[<path>]",
|
|
1612
1612
|
allowArgs: true,
|
|
1613
1613
|
handle: async (command, runtime) => {
|
|
@@ -1622,32 +1622,18 @@ const BUILTIN_SLASH_COMMAND_REGISTRY: ReadonlyArray<SlashCommandSpec> = [
|
|
|
1622
1622
|
} catch {
|
|
1623
1623
|
return usage(`Directory does not exist: ${resolvedPath}`, runtime);
|
|
1624
1624
|
}
|
|
1625
|
-
let newSessionFile: string | undefined;
|
|
1626
1625
|
try {
|
|
1627
|
-
|
|
1628
|
-
const switched = await runtime.session.switchSession(newSessionFile);
|
|
1629
|
-
if (!switched) {
|
|
1630
|
-
await runtime.sessionManager.dropSession(newSessionFile);
|
|
1631
|
-
return usage("Move cancelled.", runtime);
|
|
1632
|
-
}
|
|
1626
|
+
await runtime.sessionManager.moveTo(resolvedPath);
|
|
1633
1627
|
} catch (err) {
|
|
1634
|
-
if (newSessionFile) {
|
|
1635
|
-
try {
|
|
1636
|
-
await runtime.sessionManager.dropSession(newSessionFile);
|
|
1637
|
-
} catch (dropErr) {
|
|
1638
|
-
return usage(
|
|
1639
|
-
`Move failed: ${errorMessage(err)}; failed to remove empty session: ${errorMessage(dropErr)}`,
|
|
1640
|
-
runtime,
|
|
1641
|
-
);
|
|
1642
|
-
}
|
|
1643
|
-
}
|
|
1644
1628
|
return usage(`Move failed: ${errorMessage(err)}`, runtime);
|
|
1645
1629
|
}
|
|
1646
|
-
runtime.session.markMovedFromEmptySessionFile(newSessionFile!);
|
|
1647
1630
|
setProjectDir(resolvedPath);
|
|
1631
|
+
await runtime.settings.reloadForCwd(resolvedPath);
|
|
1632
|
+
applyProviderGlobalsFromSettings(runtime.settings);
|
|
1648
1633
|
// Reload plugin/capability caches so the next prompt sees commands and
|
|
1649
1634
|
// capabilities scoped to the new cwd.
|
|
1650
1635
|
await runtime.reloadPlugins();
|
|
1636
|
+
await runtime.notifyConfigChanged?.();
|
|
1651
1637
|
await runtime.notifyTitleChanged?.();
|
|
1652
1638
|
await runtime.output(`Moved to ${runtime.sessionManager.getCwd()}.`);
|
|
1653
1639
|
return commandConsumed();
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
Hidden auto-learn reminder (not a user request). If your previous turn produced anything reusable, capture it now with your learning tools — a repeatable procedure becomes a managed skill (`manage_skill`), and a durable fact, convention, or user preference is worth remembering (`learn`, when memory is enabled).
|
|
2
|
-
|
|
3
|
-
Only capture what will genuinely help next time. If nothing is worth keeping, do nothing.
|
|
4
|
-
|
|
5
|
-
This reminder is appended to the user's real message; answer that message normally — the capture is in addition to, not a replacement for, the work the user just asked for.
|