源码快照 @ 2026-09-01 (source-only, 剔除非源码素材)
Publish Claude Code Binaries / Stage and publish binaries (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-arm64 (push) Canceled after 0s
Publish Tutti App Runtime / Build darwin-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build linux-amd64 (push) Canceled after 0s
Publish Tutti App Runtime / Build windows-amd64 (push) Canceled after 0s
Sync Tutti Agent Skills / sync (push) Canceled after 0s
Windows Agent Adapters / Test Windows agent adapters (push) Canceled after 0s
Windows Daemon Adapters / Test Windows daemon adapters (push) Canceled after 0s
Publish Tutti App Runtime / Publish runtime catalog (push) Canceled after 0s

This commit is contained in:
agent-radar committed 2026-09-01 20:17:27 +08:00
commit 2ed3415fb7
8018 files changed
+1936476

No files matched your search

@@ -0,0 +1,64 @@
import type { AgentGUIConversationRailLayout } from "../agent-gui/agentGuiNode/view/AgentGUINodeView.types.ts";
type HeaderElementRef = (element: HTMLElement | null) => void;
export interface AgentGuiWorkbenchRailLayoutStore {
getHeaderElementRef(nodeId: string): HeaderElementRef;
report(nodeId: string, layout: AgentGUIConversationRailLayout): void;
}
export function createAgentGuiWorkbenchRailLayoutStore(): AgentGuiWorkbenchRailLayoutStore {
const layoutsByNodeId = new Map<string, AgentGUIConversationRailLayout>();
const headerElementsByNodeId = new Map<string, HTMLElement>();
const headerElementRefsByNodeId = new Map<string, HeaderElementRef>();
const applyLayout = (
element: HTMLElement,
layout: AgentGUIConversationRailLayout
): void => {
element.style.setProperty(
"--agent-gui-workbench-header-rail-width",
`${Math.round(layout.leftPanelWidthPx)}px`
);
};
return {
getHeaderElementRef(nodeId) {
const existingRef = headerElementRefsByNodeId.get(nodeId);
if (existingRef) {
return existingRef;
}
const ref: HeaderElementRef = (element) => {
if (element) {
headerElementsByNodeId.set(nodeId, element);
const layout = layoutsByNodeId.get(nodeId);
if (layout) {
applyLayout(element, layout);
}
return;
}
headerElementsByNodeId.delete(nodeId);
headerElementRefsByNodeId.delete(nodeId);
layoutsByNodeId.delete(nodeId);
};
headerElementRefsByNodeId.set(nodeId, ref);
return ref;
},
report(nodeId, layout) {
const current = layoutsByNodeId.get(nodeId);
if (
current?.conversationRailWidthPx === layout.conversationRailWidthPx &&
current?.leftPanelWidthPx === layout.leftPanelWidthPx &&
current?.providerRailWidthPx === layout.providerRailWidthPx &&
current?.resizing === layout.resizing
) {
return;
}
layoutsByNodeId.set(nodeId, layout);
const element = headerElementsByNodeId.get(nodeId);
if (element) {
applyLayout(element, layout);
}
}
};
}