@hasna/oldpal 0.3.8 → 0.4.0

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/dist/index.js CHANGED
@@ -28594,7 +28594,7 @@ var import_react20 = __toESM(require_react(), 1);
28594
28594
  // node_modules/.pnpm/ink@5.2.1_@types+react@18.3.27_react-devtools-core@4.28.5_react@18.3.1/node_modules/ink/build/hooks/use-focus-manager.js
28595
28595
  var import_react21 = __toESM(require_react(), 1);
28596
28596
  // packages/terminal/src/components/App.tsx
28597
- var import_react27 = __toESM(require_react(), 1);
28597
+ var import_react26 = __toESM(require_react(), 1);
28598
28598
  // packages/shared/src/utils.ts
28599
28599
  import { randomUUID } from "crypto";
28600
28600
  function generateId() {
@@ -28788,36 +28788,37 @@ import { join } from "path";
28788
28788
 
28789
28789
  class ConnectorBridge {
28790
28790
  connectors = new Map;
28791
+ static cache = new Map;
28791
28792
  async discover(connectorNames) {
28792
- const names = connectorNames || [
28793
- "notion",
28794
- "googledrive",
28795
- "gmail",
28796
- "googlecalendar",
28797
- "googlecontacts",
28798
- "linear",
28799
- "slack",
28800
- "discord",
28801
- "github",
28802
- "x",
28803
- "exa",
28804
- "anthropic",
28805
- "openai",
28806
- "elevenlabs"
28807
- ];
28808
- const results = await Promise.all(names.map(async (name) => {
28809
- const cli = `connect-${name}`;
28810
- try {
28811
- const result = await Bun.$`which ${cli}`.quiet().nothrow();
28812
- if (result.exitCode !== 0)
28793
+ const names = connectorNames || [];
28794
+ if (names.length === 0) {
28795
+ return [];
28796
+ }
28797
+ const uncached = names.filter((n) => !ConnectorBridge.cache.has(n));
28798
+ if (uncached.length > 0) {
28799
+ const results = await Promise.all(uncached.map(async (name) => {
28800
+ const cli = `connect-${name}`;
28801
+ try {
28802
+ const result = await Promise.race([
28803
+ Bun.$`which ${cli}`.quiet().nothrow(),
28804
+ new Promise((_, reject) => setTimeout(() => reject(new Error("timeout")), 500))
28805
+ ]);
28806
+ if (result.exitCode !== 0) {
28807
+ ConnectorBridge.cache.set(name, null);
28808
+ return null;
28809
+ }
28810
+ const connector = this.createMinimalConnector(name, cli);
28811
+ ConnectorBridge.cache.set(name, connector);
28812
+ return connector;
28813
+ } catch {
28814
+ ConnectorBridge.cache.set(name, null);
28813
28815
  return null;
28814
- } catch {
28815
- return null;
28816
- }
28817
- return this.discoverConnector(name, cli);
28818
- }));
28816
+ }
28817
+ }));
28818
+ }
28819
28819
  const discovered = [];
28820
- for (const connector of results) {
28820
+ for (const name of names) {
28821
+ const connector = ConnectorBridge.cache.get(name);
28821
28822
  if (connector) {
28822
28823
  discovered.push(connector);
28823
28824
  this.connectors.set(connector.name, connector);
@@ -28825,6 +28826,20 @@ class ConnectorBridge {
28825
28826
  }
28826
28827
  return discovered;
28827
28828
  }
28829
+ createMinimalConnector(name, cli) {
28830
+ return {
28831
+ name,
28832
+ cli,
28833
+ description: `${name} connector`,
28834
+ commands: [
28835
+ { name: "help", description: "Show available commands", args: [], options: [] }
28836
+ ],
28837
+ auth: {
28838
+ type: "oauth2",
28839
+ statusCommand: `${cli} auth status`
28840
+ }
28841
+ };
28842
+ }
28828
28843
  async discoverConnector(name, cli) {
28829
28844
  try {
28830
28845
  const helpResult = await Bun.$`${cli} --help`.quiet();
@@ -30534,11 +30549,11 @@ Cache savings: ~$${cacheSavings.toFixed(4)}
30534
30549
  **Model Information**
30535
30550
 
30536
30551
  `;
30537
- message += `Current model: claude-3-5-sonnet-20241022
30552
+ message += `Current model: claude-sonnet-4-20250514 (Claude 4 Sonnet)
30538
30553
  `;
30539
30554
  message += `Context window: 200,000 tokens
30540
30555
  `;
30541
- message += `Max output: 8,192 tokens
30556
+ message += `Max output: 64,000 tokens
30542
30557
 
30543
30558
  `;
30544
30559
  message += `*Model selection coming in a future update*
@@ -31998,154 +32013,32 @@ function ProcessingIndicator({
31998
32013
  }, undefined, true, undefined, this);
31999
32014
  }
32000
32015
 
32001
- // packages/terminal/src/components/ToolCallBox.tsx
32002
- var import_react26 = __toESM(require_react(), 1);
32003
- var jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
32004
- function ToolCallBox({
32005
- entries,
32006
- maxVisible = 3,
32007
- isExpanded = false,
32008
- onToggleExpand
32009
- }) {
32010
- if (entries.length === 0) {
32011
- return null;
32012
- }
32013
- const visibleEntries = isExpanded ? entries : entries.slice(-maxVisible);
32014
- const hiddenCount = entries.length - visibleEntries.length;
32015
- return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
32016
- flexDirection: "column",
32017
- borderStyle: "round",
32018
- borderColor: "gray",
32019
- paddingX: 1,
32020
- marginY: 1,
32021
- children: [
32022
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
32023
- justifyContent: "space-between",
32024
- children: [
32025
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32026
- dimColor: true,
32027
- bold: true,
32028
- children: [
32029
- "Tools (",
32030
- entries.length,
32031
- ")"
32032
- ]
32033
- }, undefined, true, undefined, this),
32034
- entries.length > maxVisible && /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32035
- dimColor: true,
32036
- children: isExpanded ? "Ctrl+O to collapse" : "Ctrl+O to expand"
32037
- }, undefined, false, undefined, this)
32038
- ]
32039
- }, undefined, true, undefined, this),
32040
- hiddenCount > 0 && !isExpanded && /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32041
- dimColor: true,
32042
- children: [
32043
- " +",
32044
- hiddenCount,
32045
- " more above..."
32046
- ]
32047
- }, undefined, true, undefined, this),
32048
- visibleEntries.map((entry, index) => /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(ToolCallRow, {
32049
- entry
32050
- }, entry.toolCall.id, false, undefined, this))
32051
- ]
32052
- }, undefined, true, undefined, this);
32053
- }
32054
- function ToolCallRow({ entry }) {
32055
- const { toolCall, result } = entry;
32056
- const statusIcon = result ? result.isError ? "\u2717" : "\u2713" : "\u25D0";
32057
- const statusColor = result ? result.isError ? "red" : "green" : "yellow";
32058
- return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
32059
- children: [
32060
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32061
- color: statusColor,
32062
- children: [
32063
- statusIcon,
32064
- " "
32065
- ]
32066
- }, undefined, true, undefined, this),
32067
- /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32068
- dimColor: true,
32069
- children: formatToolCall2(toolCall)
32070
- }, undefined, false, undefined, this)
32071
- ]
32072
- }, undefined, true, undefined, this);
32073
- }
32074
- function formatToolCall2(toolCall) {
32075
- const { name, input } = toolCall;
32076
- switch (name) {
32077
- case "bash":
32078
- return `bash: ${truncate2(String(input.command || ""), 50)}`;
32079
- case "curl":
32080
- case "web_fetch":
32081
- return `fetch: ${truncate2(String(input.url || ""), 50)}`;
32082
- case "web_search":
32083
- return `search: ${truncate2(String(input.query || ""), 50)}`;
32084
- case "read":
32085
- return `read: ${truncate2(String(input.path || input.file_path || ""), 50)}`;
32086
- case "write":
32087
- return `write: ${truncate2(String(input.path || input.file_path || ""), 50)}`;
32088
- case "glob":
32089
- return `glob: ${truncate2(String(input.pattern || ""), 50)}`;
32090
- case "grep":
32091
- return `grep: ${truncate2(String(input.pattern || ""), 50)}`;
32092
- case "notion":
32093
- return `notion: ${truncate2(String(input.command || input.action || ""), 50)}`;
32094
- case "gmail":
32095
- return `gmail: ${truncate2(String(input.command || input.action || ""), 50)}`;
32096
- case "googledrive":
32097
- return `drive: ${truncate2(String(input.command || input.action || ""), 50)}`;
32098
- case "googlecalendar":
32099
- return `calendar: ${truncate2(String(input.command || input.action || ""), 50)}`;
32100
- case "linear":
32101
- return `linear: ${truncate2(String(input.command || input.action || ""), 50)}`;
32102
- case "slack":
32103
- return `slack: ${truncate2(String(input.command || input.action || ""), 50)}`;
32104
- default:
32105
- return `${name}: ${truncate2(JSON.stringify(input), 40)}`;
32106
- }
32107
- }
32108
- function truncate2(text, maxLength) {
32109
- if (text.length <= maxLength)
32110
- return text;
32111
- return text.slice(0, maxLength - 3) + "...";
32112
- }
32113
- function useToolCallExpansion() {
32114
- const [isExpanded, setIsExpanded] = import_react26.useState(false);
32115
- use_input_default((input, key) => {
32116
- if (key.ctrl && input === "o") {
32117
- setIsExpanded((prev) => !prev);
32118
- }
32119
- });
32120
- return { isExpanded, setIsExpanded };
32121
- }
32122
-
32123
32016
  // packages/terminal/src/components/WelcomeBanner.tsx
32124
- var jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
32017
+ var jsx_dev_runtime7 = __toESM(require_jsx_dev_runtime(), 1);
32125
32018
  function WelcomeBanner({ version, model, directory }) {
32126
32019
  const homeDir = process.env.HOME || "";
32127
32020
  const displayDir = directory.startsWith(homeDir) ? "~" + directory.slice(homeDir.length) : directory;
32128
- return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
32021
+ return /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
32129
32022
  flexDirection: "column",
32130
32023
  marginBottom: 1,
32131
32024
  children: [
32132
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
32025
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
32133
32026
  children: [
32134
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32027
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32135
32028
  color: "cyan",
32136
32029
  bold: true,
32137
32030
  children: ">"
32138
32031
  }, undefined, false, undefined, this),
32139
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32032
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32140
32033
  color: "cyan",
32141
32034
  bold: true,
32142
32035
  children: "_ "
32143
32036
  }, undefined, false, undefined, this),
32144
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32037
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32145
32038
  bold: true,
32146
32039
  children: "oldpal"
32147
32040
  }, undefined, false, undefined, this),
32148
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32041
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32149
32042
  dimColor: true,
32150
32043
  children: [
32151
32044
  " (v",
@@ -32155,29 +32048,29 @@ function WelcomeBanner({ version, model, directory }) {
32155
32048
  }, undefined, true, undefined, this)
32156
32049
  ]
32157
32050
  }, undefined, true, undefined, this),
32158
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
32051
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
32159
32052
  marginTop: 1,
32160
32053
  children: [
32161
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32054
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32162
32055
  dimColor: true,
32163
32056
  children: "model: "
32164
32057
  }, undefined, false, undefined, this),
32165
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32058
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32166
32059
  children: model
32167
32060
  }, undefined, false, undefined, this),
32168
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32061
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32169
32062
  dimColor: true,
32170
32063
  children: " /model to change"
32171
32064
  }, undefined, false, undefined, this)
32172
32065
  ]
32173
32066
  }, undefined, true, undefined, this),
32174
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
32067
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Box_default, {
32175
32068
  children: [
32176
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32069
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32177
32070
  dimColor: true,
32178
32071
  children: "directory: "
32179
32072
  }, undefined, false, undefined, this),
32180
- /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32073
+ /* @__PURE__ */ jsx_dev_runtime7.jsxDEV(Text, {
32181
32074
  children: displayDir
32182
32075
  }, undefined, false, undefined, this)
32183
32076
  ]
@@ -32187,30 +32080,53 @@ function WelcomeBanner({ version, model, directory }) {
32187
32080
  }
32188
32081
 
32189
32082
  // packages/terminal/src/components/App.tsx
32190
- var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
32083
+ var jsx_dev_runtime8 = __toESM(require_jsx_dev_runtime(), 1);
32084
+ function formatToolName(toolCall) {
32085
+ const { name, input } = toolCall;
32086
+ switch (name) {
32087
+ case "bash":
32088
+ return `bash`;
32089
+ case "read":
32090
+ const path = String(input.path || input.file_path || "");
32091
+ return `read ${path.split("/").pop() || ""}`;
32092
+ case "write":
32093
+ const writePath = String(input.path || input.file_path || "");
32094
+ return `write ${writePath.split("/").pop() || ""}`;
32095
+ case "glob":
32096
+ return `glob`;
32097
+ case "grep":
32098
+ return `grep`;
32099
+ case "web_search":
32100
+ return `search`;
32101
+ case "web_fetch":
32102
+ case "curl":
32103
+ return `fetch`;
32104
+ default:
32105
+ return name;
32106
+ }
32107
+ }
32191
32108
  function App2({ cwd: cwd2 }) {
32192
32109
  const { exit } = use_app_default();
32193
- const [client, setClient] = import_react27.useState(null);
32194
- const [messages, setMessages] = import_react27.useState([]);
32195
- const [currentResponse, setCurrentResponse] = import_react27.useState("");
32196
- const [currentToolCall, setCurrentToolCall] = import_react27.useState();
32197
- const [lastToolResult, setLastToolResult] = import_react27.useState();
32198
- const [isProcessing, setIsProcessing] = import_react27.useState(false);
32199
- const [isInitializing, setIsInitializing] = import_react27.useState(true);
32200
- const [error, setError] = import_react27.useState(null);
32201
- const [messageQueue, setMessageQueue] = import_react27.useState([]);
32202
- const [activityLog, setActivityLog] = import_react27.useState([]);
32203
- const [tokenUsage, setTokenUsage] = import_react27.useState();
32204
- const [processingStartTime, setProcessingStartTime] = import_react27.useState();
32205
- const [currentTurnTokens, setCurrentTurnTokens] = import_react27.useState(0);
32206
- const [scrollOffset, setScrollOffset] = import_react27.useState(0);
32207
- const [autoScroll, setAutoScroll] = import_react27.useState(true);
32208
- const { isExpanded: toolsExpanded } = useToolCallExpansion();
32209
- const responseRef = import_react27.useRef("");
32210
- const clientRef = import_react27.useRef(null);
32211
- const toolCallsRef = import_react27.useRef([]);
32212
- const toolResultsRef = import_react27.useRef([]);
32213
- const processQueue = import_react27.useCallback(async () => {
32110
+ const [client, setClient] = import_react26.useState(null);
32111
+ const [messages, setMessages] = import_react26.useState([]);
32112
+ const [currentResponse, setCurrentResponse] = import_react26.useState("");
32113
+ const [currentToolCall, setCurrentToolCall] = import_react26.useState();
32114
+ const [lastToolResult, setLastToolResult] = import_react26.useState();
32115
+ const [isProcessing, setIsProcessing] = import_react26.useState(false);
32116
+ const [isInitializing, setIsInitializing] = import_react26.useState(true);
32117
+ const [error, setError] = import_react26.useState(null);
32118
+ const [messageQueue, setMessageQueue] = import_react26.useState([]);
32119
+ const [activityLog, setActivityLog] = import_react26.useState([]);
32120
+ const [tokenUsage, setTokenUsage] = import_react26.useState();
32121
+ const [processingStartTime, setProcessingStartTime] = import_react26.useState();
32122
+ const [currentTurnTokens, setCurrentTurnTokens] = import_react26.useState(0);
32123
+ const [scrollOffset, setScrollOffset] = import_react26.useState(0);
32124
+ const [autoScroll, setAutoScroll] = import_react26.useState(true);
32125
+ const responseRef = import_react26.useRef("");
32126
+ const clientRef = import_react26.useRef(null);
32127
+ const toolCallsRef = import_react26.useRef([]);
32128
+ const toolResultsRef = import_react26.useRef([]);
32129
+ const processQueue = import_react26.useCallback(async () => {
32214
32130
  if (!clientRef.current || messageQueue.length === 0)
32215
32131
  return;
32216
32132
  const nextMessage = messageQueue[0];
@@ -32235,7 +32151,7 @@ function App2({ cwd: cwd2 }) {
32235
32151
  setIsProcessing(true);
32236
32152
  await clientRef.current.send(nextMessage);
32237
32153
  }, [messageQueue]);
32238
- import_react27.useEffect(() => {
32154
+ import_react26.useEffect(() => {
32239
32155
  const initClient = async () => {
32240
32156
  try {
32241
32157
  const newClient = new EmbeddedClient(cwd2);
@@ -32345,17 +32261,19 @@ function App2({ cwd: cwd2 }) {
32345
32261
  };
32346
32262
  initClient();
32347
32263
  }, [cwd2]);
32348
- import_react27.useEffect(() => {
32264
+ import_react26.useEffect(() => {
32349
32265
  if (!isProcessing && messageQueue.length > 0) {
32350
32266
  processQueue();
32351
32267
  }
32352
32268
  }, [isProcessing, messageQueue.length, processQueue]);
32353
- import_react27.useEffect(() => {
32269
+ import_react26.useEffect(() => {
32354
32270
  if (autoScroll) {
32355
32271
  setScrollOffset(0);
32356
32272
  }
32357
32273
  }, [messages.length, autoScroll]);
32358
- const maxVisibleMessages = 10;
32274
+ const baseMaxVisible = 10;
32275
+ const toolCallsHeight = isProcessing ? Math.min(toolCallsRef.current.length, 5) : 0;
32276
+ const maxVisibleMessages = Math.max(3, baseMaxVisible - toolCallsHeight);
32359
32277
  use_input_default((input, key) => {
32360
32278
  if (key.ctrl && input === "c") {
32361
32279
  if (isProcessing && client) {
@@ -32426,7 +32344,7 @@ function App2({ cwd: cwd2 }) {
32426
32344
  setAutoScroll(true);
32427
32345
  }
32428
32346
  });
32429
- const handleSubmit = import_react27.useCallback(async (input, mode = "normal") => {
32347
+ const handleSubmit = import_react26.useCallback(async (input, mode = "normal") => {
32430
32348
  if (!client || !input.trim())
32431
32349
  return;
32432
32350
  const trimmedInput = input.trim();
@@ -32475,10 +32393,10 @@ function App2({ cwd: cwd2 }) {
32475
32393
  await client.send(trimmedInput);
32476
32394
  }, [client, isProcessing]);
32477
32395
  if (isInitializing) {
32478
- return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
32396
+ return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
32479
32397
  flexDirection: "column",
32480
32398
  padding: 1,
32481
- children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Spinner2, {
32399
+ children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Spinner2, {
32482
32400
  label: "Initializing..."
32483
32401
  }, undefined, false, undefined, this)
32484
32402
  }, undefined, false, undefined, this);
@@ -32489,17 +32407,17 @@ function App2({ cwd: cwd2 }) {
32489
32407
  });
32490
32408
  const isThinking = isProcessing && !currentResponse && !currentToolCall && toolCallEntries.length === 0;
32491
32409
  const showWelcome = messages.length === 0 && !isProcessing;
32492
- return /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
32410
+ return /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
32493
32411
  flexDirection: "column",
32494
32412
  padding: 1,
32495
32413
  children: [
32496
- showWelcome && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(WelcomeBanner, {
32497
- version: "0.3.8",
32498
- model: "claude-sonnet-4-20250514",
32414
+ showWelcome && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(WelcomeBanner, {
32415
+ version: "0.4.0",
32416
+ model: "claude-4-sonnet",
32499
32417
  directory: cwd2
32500
32418
  }, undefined, false, undefined, this),
32501
- scrollOffset > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
32502
- children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
32419
+ scrollOffset > 0 && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
32420
+ children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32503
32421
  dimColor: true,
32504
32422
  children: [
32505
32423
  "\u2191 ",
@@ -32508,7 +32426,7 @@ function App2({ cwd: cwd2 }) {
32508
32426
  ]
32509
32427
  }, undefined, true, undefined, this)
32510
32428
  }, undefined, false, undefined, this),
32511
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Messages4, {
32429
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Messages4, {
32512
32430
  messages,
32513
32431
  currentResponse: isProcessing ? currentResponse : undefined,
32514
32432
  currentToolCall: undefined,
@@ -32517,14 +32435,24 @@ function App2({ cwd: cwd2 }) {
32517
32435
  scrollOffset,
32518
32436
  maxVisible: maxVisibleMessages
32519
32437
  }, undefined, false, undefined, this),
32520
- isProcessing && toolCallEntries.length > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ToolCallBox, {
32521
- entries: toolCallEntries,
32522
- maxVisible: 3,
32523
- isExpanded: toolsExpanded
32438
+ isProcessing && toolCallEntries.length > 0 && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
32439
+ marginY: 1,
32440
+ children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32441
+ dimColor: true,
32442
+ children: [
32443
+ "\u2699 ",
32444
+ toolCallEntries.length,
32445
+ " tool",
32446
+ toolCallEntries.length > 1 ? "s" : "",
32447
+ " running",
32448
+ toolCallEntries.length > 0 && `: ${formatToolName(toolCallEntries[toolCallEntries.length - 1].toolCall)}`,
32449
+ toolCallEntries.length > 1 && ` (+${toolCallEntries.length - 1} more)`
32450
+ ]
32451
+ }, undefined, true, undefined, this)
32524
32452
  }, undefined, false, undefined, this),
32525
- messageQueue.length > 0 && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
32453
+ messageQueue.length > 0 && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
32526
32454
  marginY: 1,
32527
- children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
32455
+ children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32528
32456
  dimColor: true,
32529
32457
  children: [
32530
32458
  messageQueue.length,
@@ -32534,9 +32462,9 @@ function App2({ cwd: cwd2 }) {
32534
32462
  ]
32535
32463
  }, undefined, true, undefined, this)
32536
32464
  }, undefined, false, undefined, this),
32537
- error && /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Box_default, {
32465
+ error && /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Box_default, {
32538
32466
  marginY: 1,
32539
- children: /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Text, {
32467
+ children: /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Text, {
32540
32468
  color: "red",
32541
32469
  children: [
32542
32470
  "Error: ",
@@ -32544,18 +32472,18 @@ function App2({ cwd: cwd2 }) {
32544
32472
  ]
32545
32473
  }, undefined, true, undefined, this)
32546
32474
  }, undefined, false, undefined, this),
32547
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(ProcessingIndicator, {
32475
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(ProcessingIndicator, {
32548
32476
  isProcessing,
32549
32477
  startTime: processingStartTime,
32550
32478
  tokenCount: currentTurnTokens,
32551
32479
  isThinking
32552
32480
  }, undefined, false, undefined, this),
32553
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Input, {
32481
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Input, {
32554
32482
  onSubmit: handleSubmit,
32555
32483
  isProcessing,
32556
32484
  queueLength: messageQueue.length
32557
32485
  }, undefined, false, undefined, this),
32558
- /* @__PURE__ */ jsx_dev_runtime9.jsxDEV(Status, {
32486
+ /* @__PURE__ */ jsx_dev_runtime8.jsxDEV(Status, {
32559
32487
  isProcessing,
32560
32488
  cwd: cwd2,
32561
32489
  queueLength: messageQueue.length,
@@ -32566,7 +32494,7 @@ function App2({ cwd: cwd2 }) {
32566
32494
  }
32567
32495
 
32568
32496
  // packages/terminal/src/index.tsx
32569
- var jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
32497
+ var jsx_dev_runtime9 = __toESM(require_jsx_dev_runtime(), 1);
32570
32498
  var args = process.argv.slice(2);
32571
32499
  var options = {
32572
32500
  cwd: process.cwd(),
@@ -32574,7 +32502,7 @@ var options = {
32574
32502
  help: args.includes("--help") || args.includes("-h")
32575
32503
  };
32576
32504
  if (options.version) {
32577
- console.log("oldpal v0.3.8");
32505
+ console.log("oldpal v0.4.0");
32578
32506
  process.exit(0);
32579
32507
  }
32580
32508
  if (options.help) {
@@ -32598,11 +32526,11 @@ In interactive mode:
32598
32526
  `);
32599
32527
  process.exit(0);
32600
32528
  }
32601
- var { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime10.jsxDEV(App2, {
32529
+ var { waitUntilExit } = render_default(/* @__PURE__ */ jsx_dev_runtime9.jsxDEV(App2, {
32602
32530
  cwd: options.cwd
32603
32531
  }, undefined, false, undefined, this));
32604
32532
  waitUntilExit().then(() => {
32605
32533
  process.exit(0);
32606
32534
  });
32607
32535
 
32608
- //# debugId=13C80C7BB59BEAC264756E2164756E21
32536
+ //# debugId=CE824906A098BE1564756E2164756E21