pum-agent 0.2.27-beta.1 → 0.2.27-beta.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pum-agent",
3
- "version": "0.2.27-beta.1",
3
+ "version": "0.2.27-beta.2",
4
4
  "description": "A compact terminal coding agent powered by pi and OpenTUI.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/animation.tsx CHANGED
@@ -222,48 +222,6 @@ const ClockContext = createContext<Clock>({
222
222
 
223
223
  export const useClock = () => useContext(ClockContext);
224
224
 
225
- /** The prompt cursor stays visible for most of each slow blink cycle. */
226
- export function inputCursorVisible(elapsedMs: number): boolean {
227
- const phase = ((elapsedMs % CARET_PERIOD_MS) + CARET_PERIOD_MS) % CARET_PERIOD_MS;
228
- return phase < CARET_PERIOD_MS * 0.65;
229
- }
230
-
231
- /** Replace the terminal-defined fast cursor blink with the shared slow clock. */
232
- export function PromptCursorBlink({
233
- inputRef,
234
- active,
235
- }: {
236
- inputRef: RefObject<TextareaRenderable | null>;
237
- active: boolean;
238
- }) {
239
- const { subscribe, enabled } = useClock();
240
-
241
- useEffect(() => {
242
- const input = inputRef.current;
243
- if (!input) return;
244
- input.cursorStyle = { style: "block", blinking: false };
245
- if (!active) {
246
- input.showCursor = false;
247
- return;
248
- }
249
-
250
- input.showCursor = true;
251
- if (!enabled) return;
252
-
253
- let startedAt: number | undefined;
254
- let visible = true;
255
- return subscribe((elapsedMs) => {
256
- startedAt ??= elapsedMs;
257
- const next = inputCursorVisible(elapsedMs - startedAt);
258
- if (next === visible) return;
259
- visible = next;
260
- if (inputRef.current) inputRef.current.showCursor = next;
261
- });
262
- }, [active, enabled, inputRef, subscribe]);
263
-
264
- return null;
265
- }
266
-
267
225
  /**
268
226
  * One frame callback for the whole app. Animated components write straight to
269
227
  * their own renderable, so no React render happens per frame. The renderer is
package/src/app.tsx CHANGED
@@ -14,7 +14,6 @@ import { Component, memo, useEffect, useLayoutEffect, useMemo, useRef, useState,
14
14
  import {
15
15
  AnimationProvider,
16
16
  PlaceholderWave,
17
- PromptCursorBlink,
18
17
  supportsTrueColor,
19
18
  useWorkingRule,
20
19
  type WorkingRuleLabel,
@@ -6007,14 +6006,12 @@ export function App({
6007
6006
  keyBindings={PROMPT_TEXTAREA_KEY_BINDINGS}
6008
6007
  scrollMargin={1}
6009
6008
  scrollSpeed={PROMPT_SCROLL_SPEED}
6010
- cursorStyle={{ style: "block", blinking: false }}
6011
6009
  focused={promptFocused}
6012
6010
  onContentChange={handleTextareaChange}
6013
6011
  onCursorChange={scheduleInputMetrics}
6014
6012
  onSubmit={() => shellModeRef.current ? submitShellCommand() : submitPrompt()}
6015
6013
  style={{ width: promptInputColumns, flexShrink: 0, minWidth: 0, height: inputRows }}
6016
6014
  />
6017
- <PromptCursorBlink inputRef={inputRef} active={promptFocused} />
6018
6015
  {/* Reserve six columns on normal terminals. This forces wrapping
6019
6016
  before cursor movement can briefly overdraw the terminal edge. */}
6020
6017
  <box style={{ width: promptRightColumns, height: inputRows, flexShrink: 0 }} />