agent-afk 5.308.10 → 5.308.12
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/render/picker.d.ts +26 -0
- package/dist/cli.mjs +360 -359
- package/dist/index.mjs +170 -170
- package/dist/telegram/media-download.d.ts +22 -0
- package/dist/telegram.mjs +180 -180
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PickerController } from '../terminal-compositor.js';
|
|
2
|
+
import { filterOptions } from './picker-filter.js';
|
|
2
3
|
export interface PickerHost {
|
|
3
4
|
enterPickerMode(controller: PickerController): void;
|
|
4
5
|
exitPickerMode(): void;
|
|
@@ -15,4 +16,29 @@ export interface RunPickerOptions {
|
|
|
15
16
|
onCtrlC?: () => void;
|
|
16
17
|
searchable?: boolean;
|
|
17
18
|
}
|
|
19
|
+
export interface PickerState {
|
|
20
|
+
cursor: number;
|
|
21
|
+
scrollOffset: number;
|
|
22
|
+
filterQuery: string;
|
|
23
|
+
filteredResults: ReturnType<typeof filterOptions>;
|
|
24
|
+
selected: Set<number>;
|
|
25
|
+
}
|
|
26
|
+
export declare function renderPickerRows(state: PickerState, header: readonly string[], options: readonly string[], multi: boolean, searchable: boolean, terminalRowsFn: (() => number | undefined) | undefined): readonly string[];
|
|
27
|
+
export type PickerKeyAction = {
|
|
28
|
+
kind: 'repaint';
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'finish';
|
|
31
|
+
result: readonly string[] | null;
|
|
32
|
+
} | {
|
|
33
|
+
kind: 'ctrlc';
|
|
34
|
+
} | {
|
|
35
|
+
kind: 'noop';
|
|
36
|
+
};
|
|
37
|
+
export declare function handlePickerKey(state: PickerState, options: readonly string[], multi: boolean, searchable: boolean, _char: string | undefined, key: {
|
|
38
|
+
name?: string;
|
|
39
|
+
ctrl?: boolean;
|
|
40
|
+
shift?: boolean;
|
|
41
|
+
meta?: boolean;
|
|
42
|
+
sequence?: string;
|
|
43
|
+
}, terminalRowsFn?: (() => number | undefined) | undefined, headerLength?: number): PickerKeyAction;
|
|
18
44
|
export declare function runPicker(host: PickerHost, opts: RunPickerOptions): Promise<readonly string[] | null>;
|