feat(app): import-agent pill above draft composer (#833)

Surfaces the existing Import-agent sheet directly from the new-agent
draft composer, so users don't have to dig into the workspace header
menu. The pill renders only on draft tabs (gated by the prop being
provided) and reuses the existing WorkspaceImportSheet.
This commit is contained in:
Mohamed Boudra
2026-05-09 17:33:14 +08:00
committed by GitHub
parent e3ef88c297
commit 8b09846f98
7 changed files with 103 additions and 3 deletions
+10 -2
View File
@@ -18,8 +18,15 @@ function useDraftPanelDescriptor() {
}
function DraftPanel() {
const { serverId, workspaceId, tabId, target, openFileInWorkspace, retargetCurrentTab } =
usePaneContext();
const {
serverId,
workspaceId,
tabId,
target,
openFileInWorkspace,
openImportSheet,
retargetCurrentTab,
} = usePaneContext();
const { isInteractive } = usePaneFocus();
invariant(target.kind === "draft", "DraftPanel requires draft target");
@@ -52,6 +59,7 @@ function DraftPanel() {
isPaneFocused={isInteractive}
onOpenWorkspaceFile={handleOpenWorkspaceFile}
onCreated={handleCreated}
onOpenImportSheet={openImportSheet}
/>
);
}
+1
View File
@@ -11,6 +11,7 @@ export interface PaneContextValue {
closeCurrentTab: () => void;
retargetCurrentTab: (target: WorkspaceTabTarget) => void;
openFileInWorkspace: (filePath: string) => void;
openImportSheet: () => void;
}
export interface PaneFocusContextValue {