Add browser pane element picker (#670)
* feat: add browser pane element picker Port the browser pane from PR #198 and route picked elements through workspace attachments so the context follows every agent composer in a workspace. Co-authored-by: Jason Kneen <jason.kneen@bouncingfish.com> * docs: document electron platform overlays * fix: harden browser pane navigation * fix: polish browser tab interactions * fix: route browser pane focus shortcuts --------- Co-authored-by: Jason Kneen <jason.kneen@bouncingfish.com>
This commit is contained in:
co-authored by
Jason Kneen
parent
34b95e7f01
commit
906205f97a
@@ -17,19 +17,23 @@ export interface PaneFocusContextValue {
|
||||
isWorkspaceFocused: boolean;
|
||||
isPaneFocused: boolean;
|
||||
isInteractive: boolean;
|
||||
focusPane(): void;
|
||||
}
|
||||
|
||||
const PaneContext = createContext<PaneContextValue | null>(null);
|
||||
const PaneFocusContext = createContext<PaneFocusContextValue | null>(null);
|
||||
const noopFocusPane = () => {};
|
||||
|
||||
export function createPaneFocusContextValue(input: {
|
||||
isWorkspaceFocused: boolean;
|
||||
isPaneFocused: boolean;
|
||||
onFocusPane?: () => void;
|
||||
}): PaneFocusContextValue {
|
||||
return {
|
||||
isWorkspaceFocused: input.isWorkspaceFocused,
|
||||
isPaneFocused: input.isPaneFocused,
|
||||
isInteractive: input.isWorkspaceFocused && input.isPaneFocused,
|
||||
focusPane: input.onFocusPane ?? noopFocusPane,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user