agent-afk 5.108.1 → 5.108.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/dist/cli/commands/interactive/surface-setup.history-tracking.d.ts +5 -0
- package/dist/cli/commands/interactive/surface-setup.suggest-config.d.ts +25 -0
- package/dist/cli/input/suggest-prompt.d.ts +1 -0
- package/dist/cli/input/suggest-types.d.ts +1 -0
- package/dist/cli/input/types.d.ts +1 -0
- package/dist/cli.mjs +393 -392
- package/dist/index.mjs +1 -1
- package/dist/telegram.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { InputSurface } from '../../input/input-surface.js';
|
|
2
|
+
import type { SuggestContext, SuggestEngine } from '../../input/suggest.js';
|
|
3
|
+
import type { HistorySubmissionTracker } from './surface-setup.history-tracking.js';
|
|
4
|
+
export interface SuggestCtxStats {
|
|
5
|
+
model: string | undefined;
|
|
6
|
+
cwd?: string | undefined;
|
|
7
|
+
turns: readonly {
|
|
8
|
+
user: string;
|
|
9
|
+
assistant: string;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
export declare function buildSuggestConfig(opts: {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
engine: SuggestEngine;
|
|
15
|
+
surface: InputSurface;
|
|
16
|
+
stats: SuggestCtxStats;
|
|
17
|
+
apiKey: string | undefined;
|
|
18
|
+
baseUrl: string | undefined;
|
|
19
|
+
historyTracker: HistorySubmissionTracker;
|
|
20
|
+
}): {
|
|
21
|
+
suggest: {
|
|
22
|
+
engine: SuggestEngine;
|
|
23
|
+
getContext: () => SuggestContext;
|
|
24
|
+
};
|
|
25
|
+
} | Record<string, never>;
|
|
@@ -2,6 +2,7 @@ import type { CompleteRequest, SuggestContext } from './suggest-types.js';
|
|
|
2
2
|
export declare function buildPromptSuggestionSystem(): string;
|
|
3
3
|
export declare function buildPromptSuggestionUser(ctx: SuggestContext): string;
|
|
4
4
|
export declare function hasSuggestionGrounding(ctx: SuggestContext): boolean;
|
|
5
|
+
export declare function isEchoOfLastInput(suggestion: string, ctx: SuggestContext): boolean;
|
|
5
6
|
export declare function isValidPromptSuggestion(reply: string): boolean;
|
|
6
7
|
export declare function normalizePromptSuggestion(raw: string): string | null;
|
|
7
8
|
export type PromptCompleteRequest = CompleteRequest;
|
|
@@ -8,6 +8,7 @@ export interface SuggestContext {
|
|
|
8
8
|
getHistory(): string[];
|
|
9
9
|
getDropdownTopCandidate(buffer: string): string | null;
|
|
10
10
|
getTranscriptTail(): string;
|
|
11
|
+
lastSubmitted?: string;
|
|
11
12
|
getRecentCommands(): string[];
|
|
12
13
|
llmEnabled(): boolean;
|
|
13
14
|
promptSuggestEnabled?(): boolean;
|