agent-afk 5.123.4 → 5.123.5
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/cli/input/reader.keypress.d.ts +17 -0
- package/dist/cli/input/reader.keypress.nav.d.ts +5 -0
- package/dist/cli/input/reader.keypress.paste.d.ts +5 -0
- package/dist/cli/input/reader.repaint.d.ts +12 -0
- package/dist/cli/input/reader.selection.d.ts +3 -0
- package/dist/cli/input/reader.state.d.ts +19 -0
- package/dist/cli.mjs +585 -585
- package/dist/index.mjs +1 -1
- package/dist/telegram.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReaderState } from './reader.state.js';
|
|
2
|
+
import type { RepaintCtx, repaint as _repaint, schedulePaint as _schedulePaint } from './reader.repaint.js';
|
|
3
|
+
import type { applySelection as _applySelection } from './reader.selection.js';
|
|
4
|
+
import type { KeyInfo, ReadWithAutocompleteOpts } from './types.js';
|
|
5
|
+
export interface KeypressCallbacks {
|
|
6
|
+
onSubmit(): void;
|
|
7
|
+
onAbort(err: Error): void;
|
|
8
|
+
onEof(): void;
|
|
9
|
+
}
|
|
10
|
+
export interface KeypressCtx {
|
|
11
|
+
opts: ReadWithAutocompleteOpts;
|
|
12
|
+
stdout: NodeJS.WriteStream;
|
|
13
|
+
repaintCtx: RepaintCtx;
|
|
14
|
+
callbacks: KeypressCallbacks;
|
|
15
|
+
pasteWindowMs: number;
|
|
16
|
+
}
|
|
17
|
+
export declare function handleKeypress(char: string | undefined, key: KeyInfo, st: ReaderState, kCtx: KeypressCtx, repaintFn: typeof _repaint, schedulePaintFn: typeof _schedulePaint, applySelectionFn: typeof _applySelection): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ReaderState } from './reader.state.js';
|
|
2
|
+
import type { RepaintCtx, repaint as _repaint } from './reader.repaint.js';
|
|
3
|
+
import type { KeyInfo, IHistoryRing } from './types.js';
|
|
4
|
+
export declare function handleNavKey(key: KeyInfo, st: ReaderState, stdout: NodeJS.WriteStream, repaintCtx: RepaintCtx, repaintFn: typeof _repaint, history: IHistoryRing | undefined): boolean;
|
|
5
|
+
export declare function writeEofOutput(st: ReaderState, stdout: NodeJS.WriteStream): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ReaderState } from './reader.state.js';
|
|
2
|
+
import type { RepaintCtx, schedulePaint as _schedulePaint, repaint as _repaint } from './reader.repaint.js';
|
|
3
|
+
export declare function handlePasteStart(st: ReaderState): void;
|
|
4
|
+
export declare function handlePasteEnd(st: ReaderState, repaintCtx: RepaintCtx, repaintFn: typeof _repaint, schedulePaintFn: typeof _schedulePaint): void;
|
|
5
|
+
export declare function handleCtrlV(st: ReaderState, repaintCtx: RepaintCtx, schedulePaintFn: typeof _schedulePaint): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type SlashRegistryView } from '../input-highlight.js';
|
|
2
|
+
import type { IHistoryRing } from './types.js';
|
|
3
|
+
import type { ReaderState } from './reader.state.js';
|
|
4
|
+
export interface RepaintCtx {
|
|
5
|
+
stdout: NodeJS.WriteStream;
|
|
6
|
+
promptText: string;
|
|
7
|
+
promptVisibleLen: number;
|
|
8
|
+
slashRegistryView: SlashRegistryView;
|
|
9
|
+
historyGetEntries?: IHistoryRing['getEntries'];
|
|
10
|
+
}
|
|
11
|
+
export declare function repaint(st: ReaderState, ctx: RepaintCtx): void;
|
|
12
|
+
export declare function schedulePaint(st: ReaderState, ctx: RepaintCtx): void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { InputCoreState } from '../input-core.js';
|
|
2
|
+
import type { AutocompleteState } from './autocomplete-state.js';
|
|
3
|
+
import type { ImageAttachment } from './attachments.js';
|
|
4
|
+
export interface ReaderState {
|
|
5
|
+
input: InputCoreState;
|
|
6
|
+
ac: AutocompleteState;
|
|
7
|
+
rowsBelow: number;
|
|
8
|
+
pasting: boolean;
|
|
9
|
+
clipboardInFlight: boolean;
|
|
10
|
+
pasteStartBufferLen: number;
|
|
11
|
+
prevBufferRows: number;
|
|
12
|
+
prevStatusRows: number;
|
|
13
|
+
clipboardFailureMsg: string | null;
|
|
14
|
+
attachments: ImageAttachment[];
|
|
15
|
+
maxDropdownRows: number;
|
|
16
|
+
lastKeypressAt: number;
|
|
17
|
+
repaintPending: boolean;
|
|
18
|
+
settled: boolean;
|
|
19
|
+
}
|