Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/routes/v2/pages/Editor/EditorV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ const PipelineEditor = withSuspenseWrapper(
useEditorEscapeShortcut();
useDebugPanelWindow();
useTipOfTheDayWindow();
useSeedInitialDockLayoutFromPreset(componentSearchV2Enabled);

const aiEnabled = useFlagValue("ai-assistant");
useAiChatWindow(aiEnabled);

useComponentSearchV2Window(componentSearchV2Enabled);
useSeedInitialDockLayoutFromPreset(componentSearchV2Enabled);

const activeSpec = navigation.activeSpec;

Expand Down
4 changes: 3 additions & 1 deletion src/routes/v2/pages/Editor/hooks/useAiChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ export function useAiChatWindow(enabled: boolean) {
/>,
{
id: AI_CHAT_WINDOW_ID,
title: "AI Assistant",
title: "Sidekick",
position: { x: 100, y: 80 },
size: { width: 380, height: 520 },
disabledActions: ["close"],
startVisible: true,
persisted: true,
defaultDockState: "left",
},
);
}, [enabled, windows, editorSession]);
Expand Down
9 changes: 7 additions & 2 deletions src/routes/v2/shared/windows/viewPresets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface ViewPreset {
dockAreas?: PresetDockAreas;
}

const AI_ASSISTANT_WINDOW_ID = "ai-assistant-chat";
const COMPONENT_SEARCH_WINDOW_ID = "component-search-v2";
const COMPONENT_LIBRARY_WINDOW_ID = "component-library";

Expand All @@ -21,6 +22,7 @@ export const DEFAULT_DOCK_AREAS: PresetDockAreas = {
"runs-and-submission",
COMPONENT_SEARCH_WINDOW_ID,
COMPONENT_LIBRARY_WINDOW_ID,
AI_ASSISTANT_WINDOW_ID,
"pipeline-tree",
"history",
"debug-panel",
Expand All @@ -45,12 +47,14 @@ export function dockSideByWindowId(

export const DEFAULT_VIEW_PRESET: ViewPreset = {
label: "Default",
description: "Components, Runs & Submissions, Recent Runs, Pipeline Details",
description:
"Components, Runs & Submissions, Sidekick, Recent Runs, Pipeline Details",
visible: new Set([
"runs-and-submission",
"recent-runs",
"component-search-v2",
"component-library",
AI_ASSISTANT_WINDOW_ID,
"pipeline-details",
"tip-of-the-day",
]),
Expand All @@ -62,11 +66,12 @@ export const VIEW_PRESETS: ViewPreset[] = [
{
label: "All",
description:
"All windows visible, including Runs & Submissions and Recent Runs",
"All windows visible, including Runs & Submissions, Sidekick, and Recent Runs",
visible: new Set([
"runs-and-submission",
COMPONENT_SEARCH_WINDOW_ID,
COMPONENT_LIBRARY_WINDOW_ID,
AI_ASSISTANT_WINDOW_ID,
"history",
"pipeline-tree",
"pipeline-details",
Expand Down
6 changes: 6 additions & 0 deletions src/routes/v2/shared/windows/windowStore.viewPreset.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ describe("WindowStoreImpl view preset dock layout", () => {
title: "Runs",
defaultDockState: "left",
});
store.openWindow(stubContent, {
id: "ai-assistant-chat",
title: "Sidekick",
defaultDockState: "left",
});

expect(store.getDockAreaWindowIds("left")).toEqual([
"component-library",
"runs-and-submission",
"ai-assistant-chat",
]);

store.seedInitialDockLayoutFromPreset(DEFAULT_VIEW_PRESET);
Expand Down
Loading