@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.
@@ -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: "Switch to a fresh session in a different directory",
1610
- acpDescription: "Start a fresh session in a different directory",
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
- newSessionFile = SessionManager.createEmptySessionFile(resolvedPath);
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.