@antelopejs/dms-ai 0.1.3 → 0.1.4
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/pages/settings/page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/pages/settings/page.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA8E;AAC9E,kEAAwE;AACxE,oEAAuE;AAUhE,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,IAAA,qBAAc,EAChD,UAAU,EACV;IACE,WAAW,EAAE,UAAU;IACvB,WAAW,EAAE,4BAA4B;IACzC,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,CAAC;CACT,EACD,IAAA,uBAAa,EAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CACnC;IACC,MAAM,CAAC,OAAO,GAAG,IAAA,wBAAe,EAAC,mBAAmB,CAAC,CAAC,IAAI,CAAC;QACzD,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,eAAe;KACtB,CAAC,CAAC;;AAdQ,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAY,GAAE;GACF,cAAc,CAe1B"}
|
|
@@ -52,13 +52,14 @@ const MODE_OPTIONS: Array<{ value: Mode; label: string; hint: string }> = [
|
|
|
52
52
|
const SAFE_MODE_MODE_NOTE =
|
|
53
53
|
'Safe mode: raw edits and shell commands stay blocked, and Auto still asks before other actions.'
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
interface ProviderOption {
|
|
56
56
|
value: ProviderName
|
|
57
57
|
label: string
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{ value: '
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const PROVIDER_OPTIONS: ProviderOption[] = [
|
|
61
|
+
{ value: 'claude', label: 'Anthropic (Claude)' },
|
|
62
|
+
{ value: 'codex', label: 'OpenAI (Codex)' },
|
|
62
63
|
]
|
|
63
64
|
|
|
64
65
|
// One control, two meanings: a token budget on Claude, a reasoning effort level
|
|
@@ -107,7 +108,7 @@ function availabilityOf(name: ProviderName): ProviderAvailability {
|
|
|
107
108
|
return settings.value.providers?.[name] ?? { available: false }
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
function providerLabel(option:
|
|
111
|
+
function providerLabel(option: ProviderOption): string {
|
|
111
112
|
return availabilityOf(option.value).available
|
|
112
113
|
? option.label
|
|
113
114
|
: `${option.label} — unavailable`
|
|
@@ -119,12 +120,6 @@ const providerReason = computed(
|
|
|
119
120
|
() => availabilityOf(settings.value.provider).reason ?? null,
|
|
120
121
|
)
|
|
121
122
|
|
|
122
|
-
const activeModel = computed(
|
|
123
|
-
() =>
|
|
124
|
-
PROVIDER_OPTIONS.find((o) => o.value === settings.value.provider)?.model ??
|
|
125
|
-
'',
|
|
126
|
-
)
|
|
127
|
-
|
|
128
123
|
function onProvider(event: Event): void {
|
|
129
124
|
const next = (event.target as HTMLSelectElement).value as ProviderName
|
|
130
125
|
if (!availabilityOf(next).available) {
|
|
@@ -179,11 +174,11 @@ const SELECT_CLASS =
|
|
|
179
174
|
{{ error }}
|
|
180
175
|
</div>
|
|
181
176
|
|
|
182
|
-
<!-- Row 1:
|
|
177
|
+
<!-- Row 1: Provider (left) · Default behavior (right) -->
|
|
183
178
|
<div class="grid gap-5 lg:grid-cols-2">
|
|
184
179
|
<section class="rounded-xl border border-default bg-elevated/30">
|
|
185
180
|
<header class="border-b border-default px-5 py-4">
|
|
186
|
-
<h2 class="text-sm font-semibold text-highlighted">
|
|
181
|
+
<h2 class="text-sm font-semibold text-highlighted">Provider</h2>
|
|
187
182
|
</header>
|
|
188
183
|
<div class="flex flex-col gap-4 p-5">
|
|
189
184
|
<div>
|
|
@@ -207,16 +202,10 @@ const SELECT_CLASS =
|
|
|
207
202
|
{{ providerReason }}
|
|
208
203
|
</p>
|
|
209
204
|
<p class="mt-1.5 text-xs text-dimmed">
|
|
210
|
-
|
|
211
|
-
their transcripts are kept.
|
|
205
|
+
The provider runs its own default model. Switching provider ends
|
|
206
|
+
the live context of open conversations; their transcripts are kept.
|
|
212
207
|
</p>
|
|
213
208
|
</div>
|
|
214
|
-
<div>
|
|
215
|
-
<label class="mb-1.5 block text-xs font-medium text-toned">Model</label>
|
|
216
|
-
<select :class="SELECT_CLASS" disabled>
|
|
217
|
-
<option>{{ activeModel }}</option>
|
|
218
|
-
</select>
|
|
219
|
-
</div>
|
|
220
209
|
</div>
|
|
221
210
|
</section>
|
|
222
211
|
|
|
@@ -68,7 +68,7 @@ export const TOGGLE_SHORTCUT_KEY = 'k'
|
|
|
68
68
|
export const MODAL_OPEN_SELECTOR = '[role="dialog"][aria-modal="true"]'
|
|
69
69
|
|
|
70
70
|
// Generic header-action registry exposed by the DMS core (dms-back). Any module
|
|
71
|
-
// can push a button by writing to this shared
|
|
71
|
+
// can push a button by writing to this shared `useDmsState` key; the core renders
|
|
72
72
|
// it with no knowledge of who registered it.
|
|
73
73
|
export const HEADER_ACTIONS_STATE_KEY = 'dms:header-actions'
|
|
74
74
|
export const LAUNCHER_ACTION_ID = 'dms-ai-launcher'
|