fix: restore composer overlay integration
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s

This commit is contained in:
mesalogo
2026-10-08 23:49:19 +08:00
parent adb58d9200
commit 69f64df279
4 changed files with 22 additions and 14 deletions
+5 -2
View File
@@ -9168,8 +9168,11 @@ export class AssistantDatabase {
} }
listSupervisionResults(limit = 20, target?: SupervisionTarget, resultId?: string) { listSupervisionResults(limit = 20, target?: SupervisionTarget, resultId?: string) {
const owner = target?.type === 'conversation' ? this.getConversation(target.conversationId) const owner = target?.type === 'conversation'
: target?.type === 'task' ? this.getTask(target.taskId) : undefined ? this.requireDatabase().prepare('SELECT project_id AS projectId FROM conversations WHERE id = ?').get(target.conversationId) as { projectId: string | null } | undefined
: target?.type === 'task'
? this.requireDatabase().prepare('SELECT project_id AS projectId FROM tasks WHERE id = ?').get(target.taskId) as { projectId: string | null } | undefined
: undefined
const sourceType = target?.type ?? null const sourceType = target?.type ?? null
const sourceId = target?.type === 'conversation' ? target.conversationId : target?.taskId ?? null const sourceId = target?.type === 'conversation' ? target.conversationId : target?.taskId ?? null
return this.requireDatabase().prepare(`SELECT id, run_id AS runId, summary, return this.requireDatabase().prepare(`SELECT id, run_id AS runId, summary,
+1
View File
@@ -7090,6 +7090,7 @@ export function registerIpcHandlers(
assertTrustedSender(event, window) assertTrustedSender(event, window)
const request = supervisionSuggestionListRequestSchema.parse(input ?? {}) const request = supervisionSuggestionListRequestSchema.parse(input ?? {})
if ((await applicationSettingsStore?.get())?.heartbeatEnabled !== true) return [] if ((await applicationSettingsStore?.get())?.heartbeatEnabled !== true) return []
if (!supervisionPorts) return []
return await (await supervisionDatabase.supervisionSuggestions()).list(request.status, request.limit, request.offset) return await (await supervisionDatabase.supervisionSuggestions()).list(request.status, request.limit, request.offset)
}) })
registerHandler(ipcChannels.supervisionSuggestionAction, async (event, input: unknown) => { registerHandler(ipcChannels.supervisionSuggestionAction, async (event, input: unknown) => {
+13 -10
View File
@@ -327,6 +327,15 @@ export const Composer = memo(function Composer({
composerOptionsTriggerRef, composerOptionsTriggerRef,
closeComposerOptions, closeComposerOptions,
); );
useEffect(() => {
if (!composerOptionsOpen) return;
const frame = requestAnimationFrame(() => {
composerOptionsRef.current
?.querySelector<HTMLElement>("button:not(:disabled), input:not(:disabled)")
?.focus();
});
return () => cancelAnimationFrame(frame);
}, [composerOptionsOpen, knowledgeLibraries.length]);
useDismissibleComposerDialog( useDismissibleComposerDialog(
runtimeOptionsOpen, runtimeOptionsOpen,
runtimeOptionsRef, runtimeOptionsRef,
@@ -405,8 +414,6 @@ export const Composer = memo(function Composer({
runtime: runtimeControlsProvider, runtime: runtimeControlsProvider,
}) })
: ""; : "";
const composerContextAvailable =
supervisorEnabled === true || knowledgeLibraries.length > 0;
const composerOptionSummary = [ const composerOptionSummary = [
enabledKnowledgeLibraryIds.length > 0 enabledKnowledgeLibraryIds.length > 0
? t("composer.knowledge.select", { count: enabledKnowledgeLibraryIds.length }) ? t("composer.knowledge.select", { count: enabledKnowledgeLibraryIds.length })
@@ -808,8 +815,7 @@ export const Composer = memo(function Composer({
</button> </button>
</div> </div>
<div className="composer__configuration" role="group" aria-label={t("composer.settings")}> <div className="composer__configuration" role="group" aria-label={t("composer.settings")}>
{composerContextAvailable && ( <>
<>
<button <button
aria-controls="composer-options" aria-controls="composer-options"
aria-expanded={composerOptionsOpen} aria-expanded={composerOptionsOpen}
@@ -872,8 +878,7 @@ export const Composer = memo(function Composer({
/> />
</label> </label>
)} )}
{knowledgeLibraries.length > 0 && ( <div
<div
className="knowledge-scope" className="knowledge-scope"
onBlurCapture={(event) => { onBlurCapture={(event) => {
if ( if (
@@ -1010,11 +1015,9 @@ export const Composer = memo(function Composer({
</div> </div>
</div> </div>
)} )}
</div> </div>
)}
</div> </div>
</> </>
)}
<ComposerMenuSelect <ComposerMenuSelect
ariaLabel={t("composer.expertLabel")} ariaLabel={t("composer.expertLabel")}
className="composer-picker--expert" className="composer-picker--expert"
+3 -2
View File
@@ -66,8 +66,9 @@ app.whenReady().then(async () => {
const point = await js<{ x: number; y: number }>(`(() => { const r = document.querySelector('.composer__options-trigger').getBoundingClientRect(); return { x: Math.round(r.x+r.width/2), y: Math.round(r.y+r.height/2) }; })()`) const point = await js<{ x: number; y: number }>(`(() => { const r = document.querySelector('.composer__options-trigger').getBoundingClientRect(); return { x: Math.round(r.x+r.width/2), y: Math.round(r.y+r.height/2) }; })()`)
win.webContents.sendInputEvent({ type: 'mouseDown', ...point, button: 'left', clickCount: 1 }) win.webContents.sendInputEvent({ type: 'mouseDown', ...point, button: 'left', clickCount: 1 })
win.webContents.sendInputEvent({ type: 'mouseUp', ...point, button: 'left', clickCount: 1 }) win.webContents.sendInputEvent({ type: 'mouseUp', ...point, button: 'left', clickCount: 1 })
// First focus stays on the first menu button, matching the model picker. // Focus the first enabled context control, which is the story-graph
await wait('document.activeElement === document.querySelector(".composer__options button:not(:disabled)")') // switch when no knowledge libraries are available.
await wait('document.activeElement === document.querySelector(".composer__options button:not(:disabled), .composer__options input:not(:disabled)")')
} }
const scenarios: object[] = [] const scenarios: object[] = []
try { try {