@wrongstack/tui 0.1.2 → 0.1.3
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.d.ts +17 -0
- package/dist/index.js +426 -54
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { Agent, SlashCommandRegistry, AttachmentStore, EventBus, TokenCounter, QueueStore } from '@wrongstack/core';
|
|
2
2
|
|
|
3
|
+
interface ProviderOption {
|
|
4
|
+
id: string;
|
|
5
|
+
family: string;
|
|
6
|
+
/** Model ids the picker offers in step 2 for this provider. */
|
|
7
|
+
models: string[];
|
|
8
|
+
/** Optional dim hint shown next to the model list (e.g. "from saved config"). */
|
|
9
|
+
modelsLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
3
12
|
interface RunTuiOptions {
|
|
4
13
|
agent: Agent;
|
|
5
14
|
slashRegistry: SlashCommandRegistry;
|
|
@@ -16,6 +25,14 @@ interface RunTuiOptions {
|
|
|
16
25
|
appVersion?: string;
|
|
17
26
|
/** Provider id for the startup banner ("openai", "anthropic", ...). */
|
|
18
27
|
provider?: string;
|
|
28
|
+
/** Wire family — shown beneath provider in the banner. */
|
|
29
|
+
family?: string;
|
|
30
|
+
/** Last 3 chars of the active API key — shown in the banner for visual key-pick verification. */
|
|
31
|
+
keyTail?: string;
|
|
32
|
+
/** Snapshot of keyed providers + their model lists for the `/model` picker. Async — the catalog fetch may need to hit disk/network. */
|
|
33
|
+
getPickableProviders?: () => Promise<ProviderOption[]>;
|
|
34
|
+
/** Apply a (provider, model) pair after the picker confirms. Returns an error string on failure. */
|
|
35
|
+
switchProviderAndModel?: (providerId: string, modelId: string) => string | null;
|
|
19
36
|
/**
|
|
20
37
|
* Model-specific maxContext (tokens), resolved by the CLI via the
|
|
21
38
|
* ModelsRegistry. When omitted, the TUI falls back to the provider
|