v1.2.1: fix unstyled advisor button (stylesheet install was dropped in the per-session refactor)

This commit is contained in:
Agent committed 2026-10-11 08:31:35 +00:00
1 parent 0f423e3699
commit 42551733d8
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -150,6 +150,7 @@ window.__ModuleLoader__.load({
} }
function AdvisorPickerFor({ sessionId, directory, load, t }) { function AdvisorPickerFor({ sessionId, directory, load, t }) {
React.useEffect(installCss, []); // idempotent; also installed in apply()
const store = storeFor(sessionId); const store = storeFor(sessionId);
const st = useSettings(store); const st = useSettings(store);
const dir = React.useSyncExternalStore((f) => directory.subscribe(f), () => directory.getSnapshot()); const dir = React.useSyncExternalStore((f) => directory.subscribe(f), () => directory.getSnapshot());
@@ -296,6 +297,7 @@ window.__ModuleLoader__.load({
inject: ['slots', 'locale', 'sessions', 'modelDirectories'], inject: ['slots', 'locale', 'sessions', 'modelDirectories'],
apply(ctx) { apply(ctx) {
ctx.effect(() => ctx.locale.register(NS, { en, zh }), 'omp-advisor: dictionaries'); ctx.effect(() => ctx.locale.register(NS, { en, zh }), 'omp-advisor: dictionaries');
installCss(); // styles must exist before the first render of the composer control
ctx.slots.inject('conversation.input.right', () => ctx.slots.register({ ctx.slots.inject('conversation.input.right', () => ctx.slots.register({
name: 'conversation.input.right', name: 'conversation.input.right',
id: 'omp-advisor', id: 'omp-advisor',
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@local/omp-advisor", "name": "@local/omp-advisor",
"version": "1.2.0", "version": "1.2.1",
"description": "oh-my-pi style advisor for DSH: a second model reviews every agent step and injects notes, concerns or blockers.", "description": "oh-my-pi style advisor for DSH: a second model reviews every agent step and injects notes, concerns or blockers.",
"private": true, "private": true,
"type": "module", "type": "module",