@omercnet/paseo-omp 5.4.0 → 5.5.0-next.429.1
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/OVERVIEW.md +7 -1
- package/README.md +2 -1
- package/client/ast-edit.tsx +53 -0
- package/client/composer-pill-settings.tsx +0 -5
- package/client/config-sidebar.tsx +15 -0
- package/client/generated-image.tsx +79 -0
- package/client/lsp-diagnostics.tsx +69 -0
- package/client/omp-config-surface.tsx +438 -108
- package/client/omp-config-views.ts +32 -5
- package/client/omp-extensions-section.tsx +145 -0
- package/client/omp-local-models-section.tsx +215 -0
- package/client/omp-plugin-manager.tsx +198 -3
- package/client/omp-routing-editor.tsx +123 -2
- package/client/omp-rule-test.tsx +140 -0
- package/client/omp-rules-section.tsx +353 -0
- package/client/omp-security-section.tsx +99 -0
- package/client/omp-security-state.ts +14 -0
- package/client/omp-skills-section.tsx +195 -0
- package/client/omp-tool-config-section.tsx +204 -0
- package/client/omp-tool-policy-state.ts +101 -0
- package/client/omp-tool-policy.tsx +435 -0
- package/client/omp-update-row.tsx +87 -0
- package/client/provider-diagnostics-state.ts +38 -1
- package/client/provider-image.tsx +1 -1
- package/client/rule-notice.tsx +33 -0
- package/client/sidebar-compat.ts +0 -109
- package/client/web.ts +34 -0
- package/index.client.tsx +79 -46
- package/index.server.ts +77 -3
- package/npm-shrinkwrap.json +2 -2
- package/package.json +4 -4
- package/server/generated-images.ts +57 -0
- package/server/omp-agents.ts +170 -0
- package/server/omp-extensions.ts +235 -0
- package/server/omp-list-setting.ts +98 -0
- package/server/omp-local-models.ts +202 -0
- package/server/omp-models-file.ts +178 -0
- package/server/omp-plugins.ts +182 -0
- package/server/omp-prompt-files.ts +41 -0
- package/server/omp-rule-firings.ts +211 -0
- package/server/omp-rule-switch.ts +38 -0
- package/server/omp-rule-test.ts +82 -0
- package/server/omp-rules.ts +452 -0
- package/server/omp-security.ts +169 -0
- package/server/omp-settings.ts +92 -16
- package/server/omp-skills.ts +179 -0
- package/server/omp-tool-config.ts +144 -0
- package/server/omp-update.ts +203 -0
- package/server/package-version.ts +1 -1
- package/server/provider/connection.ts +1 -1
- package/server/provider/image-cache.ts +1 -1
- package/server/provider/omp-rpc-environment.ts +1 -1
- package/server/provider/session-descriptors.ts +3 -0
- package/server/provider-diagnostics.ts +26 -4
- package/server/regular-file.ts +30 -0
- package/server/rule-notices.ts +112 -0
- package/server/turn-rows.ts +59 -0
- package/server/turn-screenshots.ts +140 -0
- package/shared/ast-edit.ts +124 -0
- package/shared/composer-pill-settings.ts +0 -2
- package/shared/generated-image.ts +68 -0
- package/shared/lsp-diagnostics.ts +141 -0
- package/shared/omp-agents.ts +26 -0
- package/shared/omp-extensions.ts +45 -0
- package/shared/omp-local-models.ts +44 -0
- package/shared/omp-models-file.ts +30 -0
- package/shared/omp-plugins.ts +90 -0
- package/shared/omp-prompt-files.ts +24 -0
- package/shared/omp-rules.ts +134 -0
- package/shared/omp-security.ts +50 -0
- package/shared/omp-settings.ts +211 -2
- package/shared/omp-skills.ts +80 -0
- package/shared/omp-tool-config.ts +283 -0
- package/shared/omp-update.ts +27 -0
- package/shared/provider-image.ts +10 -3
- package/shared/rule-notices.ts +20 -0
- package/client/hub-sidebar.tsx +0 -99
- package/client/sessions-popover.tsx +0 -78
- package/server/sessions.ts +0 -58
- package/shared/sessions.ts +0 -24
|
@@ -11,27 +11,38 @@ import type { ReactNode } from "react";
|
|
|
11
11
|
import { useCallback, useMemo, useState } from "react";
|
|
12
12
|
import { Pressable, ScrollView, Switch, Text, View } from "react-native";
|
|
13
13
|
import type { ComposerPillSettings } from "../shared/composer-pill-settings";
|
|
14
|
+
import { listOmpAgents } from "../shared/omp-agents";
|
|
14
15
|
import { listOmpConfig, type OmpConfig } from "../shared/omp-config";
|
|
15
16
|
import { listOmpModels } from "../shared/omp-models";
|
|
17
|
+
import { getOmpModelsFileStatus, refreshOmpModels } from "../shared/omp-models-file";
|
|
18
|
+
import { getOmpPromptFiles } from "../shared/omp-prompt-files";
|
|
16
19
|
import {
|
|
17
20
|
categorizeOmpSetting,
|
|
18
21
|
formatOmpSettingLabel,
|
|
19
22
|
isOmpStructuredSettingPath,
|
|
23
|
+
isOmpToolPolicyPath,
|
|
20
24
|
listOmpSettings,
|
|
21
25
|
OMP_SETTING_CATEGORIES,
|
|
22
26
|
type OmpSetting,
|
|
23
27
|
type OmpSettingCategory,
|
|
28
|
+
orderOmpToolSettings,
|
|
24
29
|
parseOmpStructuredSettingValue,
|
|
30
|
+
structuredSettingType,
|
|
25
31
|
updateOmpSettings,
|
|
26
32
|
} from "../shared/omp-settings";
|
|
27
33
|
import { type OmpStore, storeLabel } from "../shared/omp-store";
|
|
34
|
+
import { getOmpUpdateStatus } from "../shared/omp-update";
|
|
28
35
|
import { getOmpProviderHealth, type OmpProviderHealth } from "../shared/provider-diagnostics";
|
|
29
36
|
import { getOmpSupportReport, OMP_SUPPORT_ISSUE_URL } from "../shared/support-diagnostics";
|
|
30
37
|
import { ComposerPillSettingsSection } from "./composer-pill-settings";
|
|
31
38
|
import { openOmpExternalUrl } from "./external-url";
|
|
32
|
-
import { OmpAccountsSection } from "./omp-accounts-section";
|
|
39
|
+
import { ActionButton, OmpAccountsSection } from "./omp-accounts-section";
|
|
33
40
|
import { type OmpConfigStyles, useConfigStyles } from "./omp-config-styles";
|
|
34
|
-
import {
|
|
41
|
+
import {
|
|
42
|
+
resolveSurfaceView,
|
|
43
|
+
type OmpConfigSurfaceView as SurfaceView,
|
|
44
|
+
surfaceViewsForScope,
|
|
45
|
+
} from "./omp-config-views";
|
|
35
46
|
import {
|
|
36
47
|
documentationForSettingCategory,
|
|
37
48
|
documentationForSettingPath,
|
|
@@ -39,19 +50,34 @@ import {
|
|
|
39
50
|
OMP_SETTINGS_REFERENCE,
|
|
40
51
|
type OmpDocumentationLink,
|
|
41
52
|
} from "./omp-doc-links";
|
|
53
|
+
import { OmpExtensionsSection } from "./omp-extensions-section";
|
|
54
|
+
import { OmpLocalModelsSection } from "./omp-local-models-section";
|
|
42
55
|
import { OmpMcpsSection } from "./omp-mcps-section";
|
|
43
56
|
import { normalizeOmpModels } from "./omp-model-picker-state";
|
|
44
57
|
import { OmpPluginManagerSection } from "./omp-plugin-manager";
|
|
45
|
-
import {
|
|
58
|
+
import {
|
|
59
|
+
type OmpAgentCatalogState,
|
|
60
|
+
type OmpModelCatalogState,
|
|
61
|
+
StructuredRoutingEditor,
|
|
62
|
+
} from "./omp-routing-editor";
|
|
63
|
+
import { OmpRulesSection } from "./omp-rules-section";
|
|
64
|
+
import { OmpSecuritySection } from "./omp-security-section";
|
|
65
|
+
import { SECURITY_QUERY_KEY } from "./omp-security-state";
|
|
66
|
+
import { OmpSkillsSection } from "./omp-skills-section";
|
|
46
67
|
import { OmpStorePicker } from "./omp-store-picker";
|
|
47
68
|
import { ompStoreKey } from "./omp-store-state";
|
|
69
|
+
import { OmpToolConfigSection } from "./omp-tool-config-section";
|
|
70
|
+
import { ToolPolicyCard } from "./omp-tool-policy";
|
|
71
|
+
import { OmpUpdateRow, UPDATE_QUERY_KEY } from "./omp-update-row";
|
|
48
72
|
import {
|
|
49
73
|
type BinaryHealthSummary,
|
|
74
|
+
hasEnabledPluginProvider,
|
|
50
75
|
loadReadyProviderSnapshot,
|
|
51
76
|
lspTone,
|
|
52
77
|
mcpTone,
|
|
53
78
|
type PathStateSummary,
|
|
54
79
|
processTone,
|
|
80
|
+
promptFileNotices,
|
|
55
81
|
refreshProviderDiagnostics,
|
|
56
82
|
rpcUiTone,
|
|
57
83
|
selectKnownOmpProviders,
|
|
@@ -74,6 +100,8 @@ import {
|
|
|
74
100
|
const SETTINGS_QUERY_KEY = ["paseo-omp", "settings"] as const;
|
|
75
101
|
const CONFIG_POLL_MS = 30_000;
|
|
76
102
|
const HEALTH_QUERY_KEY = ["paseo-omp", "provider-health"] as const;
|
|
103
|
+
const PROMPT_FILES_QUERY_KEY = ["paseo-omp", "prompt-files"] as const;
|
|
104
|
+
const MODELS_FILE_QUERY_KEY = ["paseo-omp", "models-file"] as const;
|
|
77
105
|
const PROVIDERS_QUERY_KEY = ["paseo-omp", "provider-snapshot"] as const;
|
|
78
106
|
|
|
79
107
|
function KeyValueRow({
|
|
@@ -164,7 +192,7 @@ function ProviderSetupSection({ styles }: { styles: OmpConfigStyles }) {
|
|
|
164
192
|
function PluginConfigurationSection({ styles }: { styles: OmpConfigStyles }) {
|
|
165
193
|
return (
|
|
166
194
|
<>
|
|
167
|
-
<SectionCard styles={styles} title="
|
|
195
|
+
<SectionCard styles={styles} title="Plugin provider launch options">
|
|
168
196
|
<Text style={styles.muted}>
|
|
169
197
|
Configure inherited daemon environment names below. Paseo does not expose effective
|
|
170
198
|
profile options for active launches, so this tab documents profile overrides without
|
|
@@ -220,10 +248,14 @@ function BinarySection({
|
|
|
220
248
|
theme,
|
|
221
249
|
styles,
|
|
222
250
|
health,
|
|
251
|
+
workspaceScoped,
|
|
252
|
+
onUpdateInstalled,
|
|
223
253
|
}: {
|
|
224
254
|
theme: PluginSurfaceProps["theme"];
|
|
225
255
|
styles: OmpConfigStyles;
|
|
226
256
|
health: OmpProviderHealth;
|
|
257
|
+
workspaceScoped: boolean;
|
|
258
|
+
onUpdateInstalled(): void;
|
|
227
259
|
}) {
|
|
228
260
|
const summary = summarizeBinaryHealth(health.binary);
|
|
229
261
|
return (
|
|
@@ -245,6 +277,9 @@ function BinarySection({
|
|
|
245
277
|
valueColor={theme.colors.statusDanger}
|
|
246
278
|
/>
|
|
247
279
|
) : null}
|
|
280
|
+
{health.binary.installed && !workspaceScoped ? (
|
|
281
|
+
<OmpUpdateRow styles={styles} theme={theme} onInstalled={onUpdateInstalled} />
|
|
282
|
+
) : null}
|
|
248
283
|
</SectionCard>
|
|
249
284
|
);
|
|
250
285
|
}
|
|
@@ -358,6 +393,108 @@ function ProcessSection({
|
|
|
358
393
|
);
|
|
359
394
|
}
|
|
360
395
|
|
|
396
|
+
function PromptFilesSection({
|
|
397
|
+
theme,
|
|
398
|
+
styles,
|
|
399
|
+
cwd,
|
|
400
|
+
store,
|
|
401
|
+
}: {
|
|
402
|
+
theme: PluginSurfaceProps["theme"];
|
|
403
|
+
styles: OmpConfigStyles;
|
|
404
|
+
cwd?: string;
|
|
405
|
+
store?: OmpStore;
|
|
406
|
+
}) {
|
|
407
|
+
const loadPromptFiles = useRpc(getOmpPromptFiles);
|
|
408
|
+
const files = useQuery({
|
|
409
|
+
queryKey: [...PROMPT_FILES_QUERY_KEY, ompStoreKey(store), cwd ?? "global"],
|
|
410
|
+
queryFn: () => loadPromptFiles({ store, ...(cwd ? { cwd } : {}) }),
|
|
411
|
+
});
|
|
412
|
+
if (files.error) {
|
|
413
|
+
return <Text style={styles.error}>Could not read the OMP prompt files. Try refreshing.</Text>;
|
|
414
|
+
}
|
|
415
|
+
const notices = files.data ? promptFileNotices(files.data) : [];
|
|
416
|
+
if (notices.length === 0) return null;
|
|
417
|
+
return (
|
|
418
|
+
<SectionCard styles={styles} title="Prompt files">
|
|
419
|
+
{notices.map((notice) => (
|
|
420
|
+
<KeyValueRow
|
|
421
|
+
key={notice.file}
|
|
422
|
+
styles={styles}
|
|
423
|
+
label={notice.file}
|
|
424
|
+
value={notice.text}
|
|
425
|
+
valueColor={theme.colors.statusWarning}
|
|
426
|
+
/>
|
|
427
|
+
))}
|
|
428
|
+
</SectionCard>
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
function ModelsSection({
|
|
433
|
+
theme,
|
|
434
|
+
styles,
|
|
435
|
+
store,
|
|
436
|
+
onRefreshed,
|
|
437
|
+
}: {
|
|
438
|
+
theme: PluginSurfaceProps["theme"];
|
|
439
|
+
styles: OmpConfigStyles;
|
|
440
|
+
store?: OmpStore;
|
|
441
|
+
onRefreshed(): void;
|
|
442
|
+
}) {
|
|
443
|
+
const loadStatus = useRpc(getOmpModelsFileStatus);
|
|
444
|
+
const refreshModels = useRpc(refreshOmpModels);
|
|
445
|
+
const status = useQuery({
|
|
446
|
+
queryKey: [...MODELS_FILE_QUERY_KEY, ompStoreKey(store)],
|
|
447
|
+
queryFn: () => loadStatus({ store }),
|
|
448
|
+
});
|
|
449
|
+
const [message, setMessage] = useState<{ ok: boolean; text: string } | null>(null);
|
|
450
|
+
const refresh = useMutation({
|
|
451
|
+
mutationFn: () => refreshModels({ store }),
|
|
452
|
+
onSuccess: (result) => {
|
|
453
|
+
setMessage({
|
|
454
|
+
ok: result.ok,
|
|
455
|
+
text: result.ok
|
|
456
|
+
? "OMP refreshed its model lists. Paseo's list updates next."
|
|
457
|
+
: result.message,
|
|
458
|
+
});
|
|
459
|
+
if (result.ok) onRefreshed();
|
|
460
|
+
},
|
|
461
|
+
onError: () => setMessage({ ok: false, text: "Could not refresh models. Try again." }),
|
|
462
|
+
});
|
|
463
|
+
const current = status.data;
|
|
464
|
+
return (
|
|
465
|
+
<SectionCard styles={styles} title="Models">
|
|
466
|
+
{status.isLoading ? <Text style={styles.muted}>Checking models.yml…</Text> : null}
|
|
467
|
+
{current?.state === "ok" ? (
|
|
468
|
+
<KeyValueRow styles={styles} label="models.yml" value="No errors reported" />
|
|
469
|
+
) : null}
|
|
470
|
+
{current?.state === "invalid" ? (
|
|
471
|
+
<KeyValueRow
|
|
472
|
+
styles={styles}
|
|
473
|
+
label="models.yml"
|
|
474
|
+
value={`OMP dropped your custom providers: ${current.detail}`}
|
|
475
|
+
valueColor={theme.colors.statusDanger}
|
|
476
|
+
/>
|
|
477
|
+
) : null}
|
|
478
|
+
{current?.state === "unknown" || status.error ? (
|
|
479
|
+
<KeyValueRow styles={styles} label="models.yml" value="Could not check" />
|
|
480
|
+
) : null}
|
|
481
|
+
<View style={styles.row}>
|
|
482
|
+
<Text style={styles.rowLabel}>Model lists</Text>
|
|
483
|
+
<ActionButton
|
|
484
|
+
styles={styles}
|
|
485
|
+
theme={theme}
|
|
486
|
+
label={refresh.isPending ? "Refreshing models…" : "Refresh models"}
|
|
487
|
+
disabled={refresh.isPending}
|
|
488
|
+
onPress={() => refresh.mutate()}
|
|
489
|
+
/>
|
|
490
|
+
</View>
|
|
491
|
+
{message ? (
|
|
492
|
+
<Text style={message.ok ? styles.muted : styles.error}>{message.text}</Text>
|
|
493
|
+
) : null}
|
|
494
|
+
</SectionCard>
|
|
495
|
+
);
|
|
496
|
+
}
|
|
497
|
+
|
|
361
498
|
function ProviderHealthSection({
|
|
362
499
|
theme,
|
|
363
500
|
styles,
|
|
@@ -372,8 +509,10 @@ function ProviderHealthSection({
|
|
|
372
509
|
const paseo = usePaseo();
|
|
373
510
|
const queryClient = useQueryClient();
|
|
374
511
|
const loadHealth = useRpc(getOmpProviderHealth);
|
|
512
|
+
const loadUpdateStatus = useRpc(getOmpUpdateStatus);
|
|
513
|
+
const healthKey = [...HEALTH_QUERY_KEY, ompStoreKey(store), cwd ?? "global"];
|
|
375
514
|
const health = useQuery({
|
|
376
|
-
queryKey:
|
|
515
|
+
queryKey: healthKey,
|
|
377
516
|
queryFn: () => loadHealth({ store, ...(cwd ? { cwd } : {}) }),
|
|
378
517
|
});
|
|
379
518
|
const providers = useQuery({
|
|
@@ -382,23 +521,32 @@ function ProviderHealthSection({
|
|
|
382
521
|
});
|
|
383
522
|
const refresh = useMutation({
|
|
384
523
|
mutationFn: async () => {
|
|
385
|
-
const result = await
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
),
|
|
397
|
-
|
|
398
|
-
|
|
524
|
+
const [result, update] = await Promise.all([
|
|
525
|
+
refreshProviderDiagnostics({
|
|
526
|
+
providers: paseo.providers,
|
|
527
|
+
providerIds: [
|
|
528
|
+
...selectKnownOmpProviders(providers.data?.entries ?? []).map(
|
|
529
|
+
(provider) => provider.id,
|
|
530
|
+
),
|
|
531
|
+
...(store?.profile ? [`omp-plugin-${store.profile}`] : []),
|
|
532
|
+
],
|
|
533
|
+
loadForcedHealth: () => loadHealth({ store, force: true, ...(cwd ? { cwd } : {}) }),
|
|
534
|
+
cacheHealth: (value) => queryClient.setQueryData(healthKey, value),
|
|
535
|
+
cacheProviders: (value) => queryClient.setQueryData(PROVIDERS_QUERY_KEY, value),
|
|
536
|
+
}),
|
|
537
|
+
cwd ? undefined : loadUpdateStatus({ force: true }).catch(() => undefined),
|
|
538
|
+
]);
|
|
539
|
+
if (update) queryClient.setQueryData(UPDATE_QUERY_KEY, update);
|
|
540
|
+
await queryClient.invalidateQueries({ queryKey: PROMPT_FILES_QUERY_KEY });
|
|
541
|
+
await queryClient.invalidateQueries({ queryKey: MODELS_FILE_QUERY_KEY });
|
|
399
542
|
if (result.failed) throw new Error("Could not fully refresh OMP provider health.");
|
|
400
543
|
},
|
|
401
544
|
});
|
|
545
|
+
// After an update the version row is stale; the install already returned the fresh update status.
|
|
546
|
+
const reloadHealth = useMutation({
|
|
547
|
+
mutationFn: () => loadHealth({ store, force: true, ...(cwd ? { cwd } : {}) }),
|
|
548
|
+
onSuccess: (value) => queryClient.setQueryData(healthKey, value),
|
|
549
|
+
});
|
|
402
550
|
const isRefreshing = refresh.isPending || health.isFetching || providers.isFetching;
|
|
403
551
|
const knownProviders = providers.data ? selectKnownOmpProviders(providers.data.entries) : [];
|
|
404
552
|
|
|
@@ -432,12 +580,30 @@ function ProviderHealthSection({
|
|
|
432
580
|
{refresh.error ? (
|
|
433
581
|
<Text style={styles.error}>Could not fully refresh provider health. Try again.</Text>
|
|
434
582
|
) : null}
|
|
435
|
-
{health.data ?
|
|
583
|
+
{health.data ? (
|
|
584
|
+
<BinarySection
|
|
585
|
+
theme={theme}
|
|
586
|
+
styles={styles}
|
|
587
|
+
health={health.data}
|
|
588
|
+
workspaceScoped={cwd !== undefined}
|
|
589
|
+
onUpdateInstalled={() => reloadHealth.mutate()}
|
|
590
|
+
/>
|
|
591
|
+
) : null}
|
|
436
592
|
{health.data ? (
|
|
437
593
|
<CapabilitiesSection theme={theme} styles={styles} health={health.data} />
|
|
438
594
|
) : null}
|
|
439
595
|
{health.data ? <StorageSection theme={theme} styles={styles} health={health.data} /> : null}
|
|
440
596
|
{health.data ? <ProcessSection theme={theme} styles={styles} health={health.data} /> : null}
|
|
597
|
+
<PromptFilesSection theme={theme} styles={styles} cwd={cwd} store={store} />
|
|
598
|
+
<ModelsSection
|
|
599
|
+
theme={theme}
|
|
600
|
+
styles={styles}
|
|
601
|
+
store={store}
|
|
602
|
+
onRefreshed={() => {
|
|
603
|
+
void queryClient.invalidateQueries({ queryKey: ["paseo-omp", "models"] });
|
|
604
|
+
refresh.mutate();
|
|
605
|
+
}}
|
|
606
|
+
/>
|
|
441
607
|
|
|
442
608
|
{providers.isLoading ? <Text style={styles.muted}>Loading provider status…</Text> : null}
|
|
443
609
|
{providers.error ? (
|
|
@@ -466,6 +632,46 @@ function ProviderHealthSection({
|
|
|
466
632
|
);
|
|
467
633
|
}
|
|
468
634
|
|
|
635
|
+
function MagicKeywordsHelp({ styles }: { styles: OmpConfigStyles }) {
|
|
636
|
+
return (
|
|
637
|
+
<SectionCard styles={styles} title="Magic keywords">
|
|
638
|
+
<Text style={styles.muted}>
|
|
639
|
+
OMP treats a few standalone, lowercase words in a prompt as switches. Each adds a hidden
|
|
640
|
+
instruction for that one turn. Words inside code blocks, inline code and paths are ignored.
|
|
641
|
+
</Text>
|
|
642
|
+
<KeyValueRow
|
|
643
|
+
styles={styles}
|
|
644
|
+
label="ultrathink"
|
|
645
|
+
value="Careful reasoning, and maximum reasoning effort when automatic thinking is on."
|
|
646
|
+
/>
|
|
647
|
+
<KeyValueRow
|
|
648
|
+
styles={styles}
|
|
649
|
+
label="orchestrate"
|
|
650
|
+
value="Splits the work across parallel subagents and verifies each phase. Needs the task tool."
|
|
651
|
+
/>
|
|
652
|
+
<KeyValueRow
|
|
653
|
+
styles={styles}
|
|
654
|
+
label="workflowz"
|
|
655
|
+
value="Runs a scripted multi-subagent workflow. Needs the eval and task tools."
|
|
656
|
+
/>
|
|
657
|
+
<KeyValueRow
|
|
658
|
+
styles={styles}
|
|
659
|
+
label="jevify"
|
|
660
|
+
value="Applies a bulk-classification contract. Needs the eval tool."
|
|
661
|
+
/>
|
|
662
|
+
<Text style={styles.muted}>
|
|
663
|
+
Cost: orchestrate and workflowz can start extra subagents, so a turn that uses them costs
|
|
664
|
+
more.
|
|
665
|
+
</Text>
|
|
666
|
+
<Text style={styles.muted}>
|
|
667
|
+
To turn them off, set magicKeywords.enabled to false in Configuration. Each word also has
|
|
668
|
+
its own switch: magicKeywords.ultrathink, magicKeywords.orchestrate, magicKeywords.workflow
|
|
669
|
+
(this one switches workflowz) and magicKeywords.jevify.
|
|
670
|
+
</Text>
|
|
671
|
+
</SectionCard>
|
|
672
|
+
);
|
|
673
|
+
}
|
|
674
|
+
|
|
469
675
|
function SupportDiagnosticsSection({
|
|
470
676
|
theme,
|
|
471
677
|
styles,
|
|
@@ -594,6 +800,7 @@ function SupportDiagnosticsSection({
|
|
|
594
800
|
const CATEGORY_LABELS: Record<OmpSettingCategory, string> = {
|
|
595
801
|
appearance: "Appearance",
|
|
596
802
|
model: "Model",
|
|
803
|
+
budget: "Budget",
|
|
597
804
|
interaction: "Interaction",
|
|
598
805
|
context: "Context",
|
|
599
806
|
memory: "Memory",
|
|
@@ -762,7 +969,8 @@ function EditableScalarValue({
|
|
|
762
969
|
accessibilityLabel={`Edit ${formatOmpSettingLabel(setting.path)}`}
|
|
763
970
|
editable={!disabled}
|
|
764
971
|
keyboardType={setting.type === "number" ? "numeric" : "default"}
|
|
765
|
-
|
|
972
|
+
placeholder="Not set"
|
|
973
|
+
value={value === undefined || value === null ? "" : String(value)}
|
|
766
974
|
onChangeText={onSet}
|
|
767
975
|
style={styles.scalarInput}
|
|
768
976
|
/>
|
|
@@ -780,10 +988,12 @@ function ConfigurationCategory({
|
|
|
780
988
|
category,
|
|
781
989
|
styles,
|
|
782
990
|
settings,
|
|
991
|
+
policySettings: allPolicySettings,
|
|
783
992
|
drafts,
|
|
784
993
|
theme,
|
|
785
994
|
modelCatalog,
|
|
786
995
|
modelRoles,
|
|
996
|
+
agentCatalog,
|
|
787
997
|
disabled,
|
|
788
998
|
workspaceScoped,
|
|
789
999
|
onDraft,
|
|
@@ -794,7 +1004,10 @@ function ConfigurationCategory({
|
|
|
794
1004
|
theme: PluginSurfaceProps["theme"];
|
|
795
1005
|
modelCatalog: OmpModelCatalogState;
|
|
796
1006
|
modelRoles: Readonly<Record<string, unknown>>;
|
|
1007
|
+
agentCatalog: OmpAgentCatalogState;
|
|
797
1008
|
settings: readonly OmpSetting[];
|
|
1009
|
+
/** Every stored tool policy setting, so warnings do not depend on the search text. */
|
|
1010
|
+
policySettings: readonly OmpSetting[];
|
|
798
1011
|
drafts: Readonly<Record<string, SettingDraft>>;
|
|
799
1012
|
disabled: boolean;
|
|
800
1013
|
workspaceScoped: boolean;
|
|
@@ -802,91 +1015,110 @@ function ConfigurationCategory({
|
|
|
802
1015
|
onOpenDocumentation(link: OmpDocumentationLink): void;
|
|
803
1016
|
}) {
|
|
804
1017
|
const categoryDocumentation = documentationForSettingCategory(category.id);
|
|
1018
|
+
const visiblePolicySettings =
|
|
1019
|
+
category.id === "tools" ? settings.filter((setting) => isOmpToolPolicyPath(setting.path)) : [];
|
|
1020
|
+
const listed = settings.filter((setting) => !visiblePolicySettings.includes(setting));
|
|
805
1021
|
return (
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
1022
|
+
<>
|
|
1023
|
+
{visiblePolicySettings.length > 0 ? (
|
|
1024
|
+
<ToolPolicyCard
|
|
1025
|
+
settings={allPolicySettings}
|
|
1026
|
+
visiblePaths={visiblePolicySettings.map((setting) => setting.path)}
|
|
1027
|
+
drafts={drafts}
|
|
1028
|
+
disabled={disabled}
|
|
1029
|
+
workspaceScoped={workspaceScoped}
|
|
1030
|
+
resetLabel={workspaceScoped ? "Remove workspace override" : "Reset to default"}
|
|
1031
|
+
styles={styles}
|
|
1032
|
+
onSet={(path, value) => onDraft(path, { operation: "set", value })}
|
|
1033
|
+
onReset={(path) => onDraft(path, { operation: "reset" })}
|
|
1034
|
+
/>
|
|
1035
|
+
) : null}
|
|
1036
|
+
<SectionCard
|
|
1037
|
+
styles={styles}
|
|
1038
|
+
title={`${category.label} · ${listed.length}`}
|
|
1039
|
+
action={
|
|
1040
|
+
categoryDocumentation ? (
|
|
1041
|
+
<DocumentationLink
|
|
1042
|
+
link={categoryDocumentation}
|
|
1043
|
+
styles={styles}
|
|
1044
|
+
onOpen={onOpenDocumentation}
|
|
1045
|
+
/>
|
|
1046
|
+
) : undefined
|
|
1047
|
+
}
|
|
1048
|
+
>
|
|
1049
|
+
{listed.map((setting) => {
|
|
1050
|
+
const complex =
|
|
1051
|
+
Array.isArray(setting.value) ||
|
|
1052
|
+
(setting.value !== null && typeof setting.value === "object");
|
|
1053
|
+
const editable =
|
|
1054
|
+
!setting.redacted && ["boolean", "number", "string", "enum"].includes(setting.type);
|
|
1055
|
+
const structuredEditable =
|
|
1056
|
+
!setting.redacted &&
|
|
1057
|
+
isOmpStructuredSettingPath(setting.path) &&
|
|
1058
|
+
setting.type === structuredSettingType(setting.path);
|
|
1059
|
+
const settingDocumentation = documentationForSettingPath(setting.path);
|
|
1060
|
+
const draft = drafts[setting.path];
|
|
1061
|
+
return (
|
|
1062
|
+
<View key={setting.path} style={styles.setting}>
|
|
1063
|
+
<View style={styles.settingHeader}>
|
|
1064
|
+
<Text style={styles.cardTitle}>{formatOmpSettingLabel(setting.path)}</Text>
|
|
1065
|
+
{setting.workspaceOverride ? (
|
|
1066
|
+
<Text style={styles.source}>Workspace override</Text>
|
|
1067
|
+
) : null}
|
|
1068
|
+
{!complex && !editable && !structuredEditable ? (
|
|
1069
|
+
<StructuredSettingValue setting={setting} styles={styles} />
|
|
1070
|
+
) : null}
|
|
1071
|
+
</View>
|
|
1072
|
+
<Text selectable style={styles.settingPath}>
|
|
1073
|
+
{setting.path} · {setting.type}
|
|
1074
|
+
</Text>
|
|
1075
|
+
{settingDocumentation ? (
|
|
1076
|
+
<View style={styles.docsActions}>
|
|
1077
|
+
<DocumentationLink
|
|
1078
|
+
link={settingDocumentation}
|
|
1079
|
+
styles={styles}
|
|
1080
|
+
onOpen={onOpenDocumentation}
|
|
1081
|
+
/>
|
|
1082
|
+
</View>
|
|
837
1083
|
) : null}
|
|
838
|
-
{
|
|
1084
|
+
{editable ? (
|
|
1085
|
+
<EditableScalarValue
|
|
1086
|
+
setting={setting}
|
|
1087
|
+
draft={draft}
|
|
1088
|
+
disabled={disabled}
|
|
1089
|
+
resetLabel={workspaceScoped ? "Remove workspace override" : "Reset to default"}
|
|
1090
|
+
showReset={!workspaceScoped || setting.workspaceOverride === true}
|
|
1091
|
+
styles={styles}
|
|
1092
|
+
onSet={(value) => onDraft(setting.path, { operation: "set", value })}
|
|
1093
|
+
onReset={() => onDraft(setting.path, { operation: "reset" })}
|
|
1094
|
+
/>
|
|
1095
|
+
) : structuredEditable ? (
|
|
1096
|
+
<StructuredRoutingEditor
|
|
1097
|
+
setting={setting}
|
|
1098
|
+
value={draft?.operation === "set" ? draft.value : setting.value}
|
|
1099
|
+
disabled={disabled}
|
|
1100
|
+
resetLabel={workspaceScoped ? "Remove workspace override" : "Reset to default"}
|
|
1101
|
+
showReset={!workspaceScoped || setting.workspaceOverride === true}
|
|
1102
|
+
resetPending={draft?.operation === "reset"}
|
|
1103
|
+
styles={styles}
|
|
1104
|
+
theme={theme}
|
|
1105
|
+
modelCatalog={modelCatalog}
|
|
1106
|
+
modelRoles={modelRoles}
|
|
1107
|
+
agentCatalog={agentCatalog}
|
|
1108
|
+
onSet={(value) => onDraft(setting.path, { operation: "set", value })}
|
|
1109
|
+
onReset={() => onDraft(setting.path, { operation: "reset" })}
|
|
1110
|
+
/>
|
|
1111
|
+
) : complex ? (
|
|
839
1112
|
<StructuredSettingValue setting={setting} styles={styles} />
|
|
840
1113
|
) : null}
|
|
1114
|
+
{setting.description ? (
|
|
1115
|
+
<Text style={styles.settingDescription}>{setting.description}</Text>
|
|
1116
|
+
) : null}
|
|
841
1117
|
</View>
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
<View style={styles.docsActions}>
|
|
847
|
-
<DocumentationLink
|
|
848
|
-
link={settingDocumentation}
|
|
849
|
-
styles={styles}
|
|
850
|
-
onOpen={onOpenDocumentation}
|
|
851
|
-
/>
|
|
852
|
-
</View>
|
|
853
|
-
) : null}
|
|
854
|
-
{editable ? (
|
|
855
|
-
<EditableScalarValue
|
|
856
|
-
setting={setting}
|
|
857
|
-
draft={draft}
|
|
858
|
-
disabled={disabled}
|
|
859
|
-
resetLabel={workspaceScoped ? "Remove workspace override" : "Reset to default"}
|
|
860
|
-
showReset={!workspaceScoped || setting.workspaceOverride === true}
|
|
861
|
-
styles={styles}
|
|
862
|
-
onSet={(value) => onDraft(setting.path, { operation: "set", value })}
|
|
863
|
-
onReset={() => onDraft(setting.path, { operation: "reset" })}
|
|
864
|
-
/>
|
|
865
|
-
) : structuredEditable ? (
|
|
866
|
-
<StructuredRoutingEditor
|
|
867
|
-
setting={setting}
|
|
868
|
-
value={draft?.operation === "set" ? draft.value : setting.value}
|
|
869
|
-
disabled={disabled}
|
|
870
|
-
resetLabel={workspaceScoped ? "Remove workspace override" : "Reset to default"}
|
|
871
|
-
showReset={!workspaceScoped || setting.workspaceOverride === true}
|
|
872
|
-
resetPending={draft?.operation === "reset"}
|
|
873
|
-
styles={styles}
|
|
874
|
-
theme={theme}
|
|
875
|
-
modelCatalog={modelCatalog}
|
|
876
|
-
modelRoles={modelRoles}
|
|
877
|
-
onSet={(value) => onDraft(setting.path, { operation: "set", value })}
|
|
878
|
-
onReset={() => onDraft(setting.path, { operation: "reset" })}
|
|
879
|
-
/>
|
|
880
|
-
) : complex ? (
|
|
881
|
-
<StructuredSettingValue setting={setting} styles={styles} />
|
|
882
|
-
) : null}
|
|
883
|
-
{setting.description ? (
|
|
884
|
-
<Text style={styles.settingDescription}>{setting.description}</Text>
|
|
885
|
-
) : null}
|
|
886
|
-
</View>
|
|
887
|
-
);
|
|
888
|
-
})}
|
|
889
|
-
</SectionCard>
|
|
1118
|
+
);
|
|
1119
|
+
})}
|
|
1120
|
+
</SectionCard>
|
|
1121
|
+
</>
|
|
890
1122
|
);
|
|
891
1123
|
}
|
|
892
1124
|
|
|
@@ -930,6 +1162,7 @@ function OmpConfigContent({
|
|
|
930
1162
|
onStoreChange,
|
|
931
1163
|
storeInHistory = false,
|
|
932
1164
|
onComposerPillSettingsChange,
|
|
1165
|
+
focusRule,
|
|
933
1166
|
}: PluginSurfaceProps & {
|
|
934
1167
|
cwd?: string;
|
|
935
1168
|
store?: OmpStore;
|
|
@@ -937,11 +1170,14 @@ function OmpConfigContent({
|
|
|
937
1170
|
/** True when each store selection is a separate history entry (0.11 screen params). */
|
|
938
1171
|
storeInHistory?: boolean;
|
|
939
1172
|
onComposerPillSettingsChange?: (settings: ComposerPillSettings) => void;
|
|
1173
|
+
/** A rule to open the Rules tab on, from a rule-fired link. */
|
|
1174
|
+
focusRule?: string;
|
|
940
1175
|
}) {
|
|
941
1176
|
const loadConfig = useRpc(listOmpConfig);
|
|
942
1177
|
const loadSettings = useRpc(listOmpSettings);
|
|
943
1178
|
const updateSettings = useRpc(updateOmpSettings);
|
|
944
1179
|
const loadModels = useRpc(listOmpModels);
|
|
1180
|
+
const loadAgents = useRpc(listOmpAgents);
|
|
945
1181
|
const queryClient = useQueryClient();
|
|
946
1182
|
const context = { store, ...(cwd ? { cwd } : {}) };
|
|
947
1183
|
const pendingMutations = useIsMutating({ mutationKey: ["paseo-omp"] });
|
|
@@ -961,21 +1197,46 @@ function OmpConfigContent({
|
|
|
961
1197
|
queryFn: () => loadModels(context),
|
|
962
1198
|
staleTime: 30_000,
|
|
963
1199
|
});
|
|
964
|
-
const
|
|
1200
|
+
const agentsQuery = useQuery({
|
|
1201
|
+
queryKey: ["paseo-omp", "agents", ompStoreKey(store), cwd ?? "global"],
|
|
1202
|
+
queryFn: () => loadAgents(context),
|
|
1203
|
+
staleTime: 5 * 60_000,
|
|
1204
|
+
});
|
|
1205
|
+
const agentCatalog: OmpAgentCatalogState = {
|
|
1206
|
+
agents: agentsQuery.data?.agents ?? [],
|
|
1207
|
+
loading: agentsQuery.isLoading,
|
|
1208
|
+
...(agentsQuery.error || agentsQuery.data?.error
|
|
1209
|
+
? { error: "Could not list every OMP agent. Typed names remain available." }
|
|
1210
|
+
: {}),
|
|
1211
|
+
};
|
|
1212
|
+
const [selectedView, setView] = useState<SurfaceView>(focusRule ? "rules" : "overview");
|
|
965
1213
|
const [activeCategory, setActiveCategory] = useState<OmpSettingCategory>("appearance");
|
|
966
1214
|
const [search, setSearch] = useState("");
|
|
967
1215
|
const [drafts, setDrafts] = useState<Record<string, SettingDraft>>({});
|
|
968
1216
|
const [documentationError, setDocumentationError] = useState<string | null>(null);
|
|
969
1217
|
const styles = useConfigStyles(theme, layout.compact);
|
|
970
1218
|
const normalizedSearch = search.trim().toLocaleLowerCase();
|
|
971
|
-
const
|
|
1219
|
+
const paseo = usePaseo();
|
|
1220
|
+
const providers = useQuery({
|
|
1221
|
+
queryKey: PROVIDERS_QUERY_KEY,
|
|
1222
|
+
queryFn: () => loadReadyProviderSnapshot(paseo.providers),
|
|
1223
|
+
});
|
|
1224
|
+
// Until the snapshot settles, keep the tab the plugin has always shown.
|
|
1225
|
+
const pluginProviderEnabled = providers.data
|
|
1226
|
+
? hasEnabledPluginProvider(providers.data.entries)
|
|
1227
|
+
: true;
|
|
1228
|
+
const surfaceViews = surfaceViewsForScope({
|
|
1229
|
+
workspaceScoped: cwd !== undefined,
|
|
1230
|
+
pluginProviderEnabled,
|
|
1231
|
+
});
|
|
1232
|
+
const view = resolveSurfaceView(surfaceViews, selectedView);
|
|
972
1233
|
const catalog = useMemo(() => {
|
|
973
1234
|
const sourceSettings = settingsQuery.data?.available
|
|
974
1235
|
? settingsQuery.data.settings
|
|
975
1236
|
: fallbackSettingsFromConfig(configQuery.data?.config);
|
|
976
1237
|
const matching = sourceSettings.filter((setting) => {
|
|
977
1238
|
if (!normalizedSearch) return true;
|
|
978
|
-
return `${setting.path}\n${setting.description}`
|
|
1239
|
+
return `${setting.path}\n${formatOmpSettingLabel(setting.path)}\n${setting.description}`
|
|
979
1240
|
.toLocaleLowerCase()
|
|
980
1241
|
.includes(normalizedSearch);
|
|
981
1242
|
});
|
|
@@ -986,6 +1247,8 @@ function OmpConfigContent({
|
|
|
986
1247
|
if (group) group.push(setting);
|
|
987
1248
|
else byCategory.set(category, [setting]);
|
|
988
1249
|
}
|
|
1250
|
+
const tools = byCategory.get("tools");
|
|
1251
|
+
if (tools) byCategory.set("tools", orderOmpToolSettings(tools));
|
|
989
1252
|
return { sourceSettings, matching, byCategory };
|
|
990
1253
|
}, [configQuery.data?.config, normalizedSearch, settingsQuery.data]);
|
|
991
1254
|
const modelCatalog: OmpModelCatalogState = {
|
|
@@ -1000,6 +1263,15 @@ function OmpConfigContent({
|
|
|
1000
1263
|
? drafts.modelRoles.value
|
|
1001
1264
|
: undefined
|
|
1002
1265
|
: catalog.sourceSettings.find((setting) => setting.path === "modelRoles")?.value;
|
|
1266
|
+
const savedModelRolesValue = catalog.sourceSettings.find(
|
|
1267
|
+
(setting) => setting.path === "modelRoles",
|
|
1268
|
+
)?.value;
|
|
1269
|
+
const savedModelRoles =
|
|
1270
|
+
savedModelRolesValue !== null &&
|
|
1271
|
+
typeof savedModelRolesValue === "object" &&
|
|
1272
|
+
!Array.isArray(savedModelRolesValue)
|
|
1273
|
+
? (savedModelRolesValue as Readonly<Record<string, unknown>>)
|
|
1274
|
+
: {};
|
|
1003
1275
|
const modelRoles =
|
|
1004
1276
|
modelRolesValue !== null &&
|
|
1005
1277
|
typeof modelRolesValue === "object" &&
|
|
@@ -1033,7 +1305,7 @@ function OmpConfigContent({
|
|
|
1033
1305
|
let value: unknown = draft.value;
|
|
1034
1306
|
if (isOmpStructuredSettingPath(path)) {
|
|
1035
1307
|
const parsed = parseOmpStructuredSettingValue(path, value);
|
|
1036
|
-
if (parsed === undefined) throw new Error(`${path} contains invalid
|
|
1308
|
+
if (parsed === undefined) throw new Error(`${path} contains invalid values.`);
|
|
1037
1309
|
value = parsed;
|
|
1038
1310
|
} else if (setting.type === "number") {
|
|
1039
1311
|
const raw = String(draft.value).trim();
|
|
@@ -1051,6 +1323,7 @@ function OmpConfigContent({
|
|
|
1051
1323
|
queryClient.setQueryData(settingsQueryKey, result.catalog);
|
|
1052
1324
|
void queryClient.invalidateQueries({ queryKey: SETTINGS_QUERY_KEY });
|
|
1053
1325
|
void queryClient.invalidateQueries({ queryKey: ["paseo-omp", "config"] });
|
|
1326
|
+
void queryClient.invalidateQueries({ queryKey: SECURITY_QUERY_KEY });
|
|
1054
1327
|
if (
|
|
1055
1328
|
!result.conflict &&
|
|
1056
1329
|
!result.failed &&
|
|
@@ -1166,6 +1439,24 @@ function OmpConfigContent({
|
|
|
1166
1439
|
{view === "plugins" ? (
|
|
1167
1440
|
<OmpPluginManagerSection theme={theme} compact={layout.compact} cwd={cwd} store={store} />
|
|
1168
1441
|
) : null}
|
|
1442
|
+
{view === "rules" ? (
|
|
1443
|
+
<OmpRulesSection
|
|
1444
|
+
theme={theme}
|
|
1445
|
+
styles={styles}
|
|
1446
|
+
cwd={cwd}
|
|
1447
|
+
store={store}
|
|
1448
|
+
focusRule={focusRule}
|
|
1449
|
+
/>
|
|
1450
|
+
) : null}
|
|
1451
|
+
{view === "skills" ? (
|
|
1452
|
+
<OmpSkillsSection theme={theme} styles={styles} cwd={cwd} store={store} />
|
|
1453
|
+
) : null}
|
|
1454
|
+
{view === "extensions" ? (
|
|
1455
|
+
<OmpExtensionsSection theme={theme} styles={styles} cwd={cwd} store={store} />
|
|
1456
|
+
) : null}
|
|
1457
|
+
{view === "security" && cwd ? (
|
|
1458
|
+
<OmpSecuritySection styles={styles} cwd={cwd} store={store} />
|
|
1459
|
+
) : null}
|
|
1169
1460
|
{view === "composer" && !cwd && onComposerPillSettingsChange ? (
|
|
1170
1461
|
<ComposerPillSettingsSection theme={theme} onChange={onComposerPillSettingsChange} />
|
|
1171
1462
|
) : null}
|
|
@@ -1175,7 +1466,10 @@ function OmpConfigContent({
|
|
|
1175
1466
|
) : null}
|
|
1176
1467
|
|
|
1177
1468
|
{view === "help" ? (
|
|
1178
|
-
|
|
1469
|
+
<>
|
|
1470
|
+
<MagicKeywordsHelp styles={styles} />
|
|
1471
|
+
<SupportDiagnosticsSection theme={theme} styles={styles} cwd={cwd} store={store} />
|
|
1472
|
+
</>
|
|
1179
1473
|
) : null}
|
|
1180
1474
|
|
|
1181
1475
|
{view === "configuration" ? (
|
|
@@ -1188,19 +1482,28 @@ function OmpConfigContent({
|
|
|
1188
1482
|
accessibilityLabel="Refresh OMP configuration"
|
|
1189
1483
|
style={styles.refresh}
|
|
1190
1484
|
disabled={
|
|
1191
|
-
configQuery.isFetching ||
|
|
1485
|
+
configQuery.isFetching ||
|
|
1486
|
+
settingsQuery.isFetching ||
|
|
1487
|
+
modelsQuery.isFetching ||
|
|
1488
|
+
agentsQuery.isFetching
|
|
1192
1489
|
}
|
|
1193
1490
|
onPress={() => {
|
|
1491
|
+
void queryClient.invalidateQueries({ queryKey: ["paseo-omp", "tool-config"] });
|
|
1492
|
+
void queryClient.invalidateQueries({ queryKey: ["paseo-omp", "local-models"] });
|
|
1194
1493
|
void Promise.all([
|
|
1195
1494
|
configQuery.refetch(),
|
|
1196
1495
|
settingsQuery.refetch(),
|
|
1197
1496
|
modelsQuery.refetch(),
|
|
1497
|
+
agentsQuery.refetch(),
|
|
1198
1498
|
]);
|
|
1199
1499
|
}}
|
|
1200
1500
|
>
|
|
1201
1501
|
<Icon name="RefreshCw" size={14} color={theme.colors.foreground} />
|
|
1202
1502
|
<Text style={styles.refreshLabel}>
|
|
1203
|
-
{configQuery.isFetching ||
|
|
1503
|
+
{configQuery.isFetching ||
|
|
1504
|
+
settingsQuery.isFetching ||
|
|
1505
|
+
modelsQuery.isFetching ||
|
|
1506
|
+
agentsQuery.isFetching
|
|
1204
1507
|
? "Refreshing…"
|
|
1205
1508
|
: "Refresh"}
|
|
1206
1509
|
</Text>
|
|
@@ -1341,8 +1644,12 @@ function OmpConfigContent({
|
|
|
1341
1644
|
theme={theme}
|
|
1342
1645
|
modelCatalog={modelCatalog}
|
|
1343
1646
|
modelRoles={modelRoles}
|
|
1647
|
+
agentCatalog={agentCatalog}
|
|
1344
1648
|
styles={styles}
|
|
1345
1649
|
settings={catalog.byCategory.get(selectedCategory.id) ?? []}
|
|
1650
|
+
policySettings={catalog.sourceSettings.filter((setting) =>
|
|
1651
|
+
isOmpToolPolicyPath(setting.path),
|
|
1652
|
+
)}
|
|
1346
1653
|
drafts={drafts}
|
|
1347
1654
|
disabled={!settingsQuery.data?.revision || save.isPending}
|
|
1348
1655
|
workspaceScoped={cwd !== undefined}
|
|
@@ -1357,6 +1664,27 @@ function OmpConfigContent({
|
|
|
1357
1664
|
</View>
|
|
1358
1665
|
</View>
|
|
1359
1666
|
) : null}
|
|
1667
|
+
<OmpToolConfigSection
|
|
1668
|
+
key={`${ompStoreKey(store)}:${cwd ?? ""}`}
|
|
1669
|
+
styles={styles}
|
|
1670
|
+
theme={theme}
|
|
1671
|
+
store={store}
|
|
1672
|
+
cwd={cwd}
|
|
1673
|
+
/>
|
|
1674
|
+
{cwd === undefined ? (
|
|
1675
|
+
<OmpLocalModelsSection
|
|
1676
|
+
styles={styles}
|
|
1677
|
+
store={store}
|
|
1678
|
+
modelRoles={savedModelRoles}
|
|
1679
|
+
settingsRevision={settingsQuery.data?.revision}
|
|
1680
|
+
rolesPending={drafts.modelRoles !== undefined}
|
|
1681
|
+
onRolesChanged={(catalog) => {
|
|
1682
|
+
if (catalog) queryClient.setQueryData(settingsQueryKey, catalog);
|
|
1683
|
+
void queryClient.invalidateQueries({ queryKey: SETTINGS_QUERY_KEY });
|
|
1684
|
+
void queryClient.invalidateQueries({ queryKey: ["paseo-omp", "config"] });
|
|
1685
|
+
}}
|
|
1686
|
+
/>
|
|
1687
|
+
) : null}
|
|
1360
1688
|
</>
|
|
1361
1689
|
) : null}
|
|
1362
1690
|
</ScrollView>
|
|
@@ -1367,6 +1695,7 @@ function OmpStoreContent(
|
|
|
1367
1695
|
props: PluginSurfaceProps & {
|
|
1368
1696
|
cwd?: string;
|
|
1369
1697
|
onComposerPillSettingsChange?: (settings: ComposerPillSettings) => void;
|
|
1698
|
+
focusRule?: string;
|
|
1370
1699
|
/** Controlled selection (0.11 screen params); omitted, the surface keeps local state. */
|
|
1371
1700
|
store?: OmpStore;
|
|
1372
1701
|
onStoreChange?: (store: OmpStore | undefined) => void;
|
|
@@ -1393,6 +1722,7 @@ export function OmpConfigSurface(
|
|
|
1393
1722
|
onComposerPillSettingsChange: (settings: ComposerPillSettings) => void;
|
|
1394
1723
|
store?: OmpStore;
|
|
1395
1724
|
onStoreChange?: (store: OmpStore | undefined) => void;
|
|
1725
|
+
focusRule?: string;
|
|
1396
1726
|
},
|
|
1397
1727
|
) {
|
|
1398
1728
|
return <OmpStoreContent {...props} />;
|