@marimo-team/frontend 0.19.3-dev14 → 0.19.3-dev19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{CellStatus-BwPGnX3z.js → CellStatus-DLqgbVV4.js} +1 -1
- package/dist/assets/{JsonOutput--AuyEErr.js → JsonOutput-B64aMW9B.js} +1 -1
- package/dist/assets/{MarimoErrorOutput-BZjY8e2w.js → MarimoErrorOutput-Cva6Gfqr.js} +1 -1
- package/dist/assets/{RenderHTML-BTLaM20B.js → RenderHTML-Daqo9pcD.js} +1 -1
- package/dist/assets/{add-cell-with-ai-BWWVs9qV.js → add-cell-with-ai-BsHIKGwv.js} +1 -1
- package/dist/assets/{add-database-form-Bw_YRH1r.js → add-database-form-hxk-QlNU.js} +1 -1
- package/dist/assets/{agent-panel-Bm-vW8YL.js → agent-panel-ZJGfvLy4.js} +15 -15
- package/dist/assets/{ai-model-dropdown-BrUOgnWS.js → ai-model-dropdown-nzo8MLQ5.js} +1 -1
- package/dist/assets/{app-config-button-B8CXELx0.js → app-config-button-BeOl77GX.js} +1 -1
- package/dist/assets/{cell-editor-CQcpZLQc.js → cell-editor-c1P0x4Fj.js} +1 -1
- package/dist/assets/{cell-link-CFAPzUg5.js → cell-link-T1P92ttw.js} +1 -1
- package/dist/assets/{cells-DU3EySUd.js → cells-CibeVr5R.js} +1 -1
- package/dist/assets/{chat-components-Bc9j9ls4.js → chat-components-CVdyP1VW.js} +1 -1
- package/dist/assets/{chat-display-BrTi6c8V.js → chat-display-Bbzp0CzX.js} +1 -1
- package/dist/assets/{chat-panel-8Dym5Gv3.js → chat-panel-T30-embL.js} +1 -1
- package/dist/assets/{client-DfkWorYM.js → client-CEtu-2VG.js} +1 -1
- package/dist/assets/{column-preview-Ck6B_-sQ.js → column-preview-BlyFeHSu.js} +1 -1
- package/dist/assets/{command-B_minI8b.js → command-CyUURgqS.js} +1 -1
- package/dist/assets/{command-palette-BT3u6JBB.js → command-palette-DfiEH7WH.js} +1 -1
- package/dist/assets/{common-jorbwXZC.js → common-eyGhVBMz.js} +1 -1
- package/dist/assets/{datasource-DCvPlnaJ.js → datasource-D4vwmOLv.js} +1 -1
- package/dist/assets/{dependency-graph-panel-C9jYZ6pA.js → dependency-graph-panel-Cr-_H1bC.js} +1 -1
- package/dist/assets/{documentation-panel-AsatrTfg.js → documentation-panel-mdqxAzQf.js} +1 -1
- package/dist/assets/{download-PR1bF3g_.js → download-Bd63S7ca.js} +1 -1
- package/dist/assets/{edit-page-W6lXebDS.js → edit-page-CgVMZsLj.js} +4 -4
- package/dist/assets/{error-panel-D_wVKV6I.js → error-panel-zDg8AjLO.js} +1 -1
- package/dist/assets/{es-CEE_7T0w.js → es-BMs8n9bF.js} +1 -1
- package/dist/assets/{file-explorer-panel-DltK8JVp.js → file-explorer-panel-Bvbp6xd9.js} +1 -1
- package/dist/assets/{floating-outline-BfdazXWm.js → floating-outline-DmKm2GKv.js} +1 -1
- package/dist/assets/{focus-CtlWIiQr.js → focus-BGO2qwac.js} +1 -1
- package/dist/assets/{form-Cy5TkLzh.js → form-Cs-aYOue.js} +1 -1
- package/dist/assets/{globals-BSLm1nlz.js → globals-BkITdONE.js} +1 -1
- package/dist/assets/{home-page-CEnaUutq.js → home-page-CqrJtZ_6.js} +1 -1
- package/dist/assets/index-DXLkhAK3.js +43 -0
- package/dist/assets/{kiosk-mode-BnTZR6mM.js → kiosk-mode-Ocj2e3JE.js} +1 -1
- package/dist/assets/{layout-BTiWDrbh.js → layout-HXw-kbRR.js} +1 -1
- package/dist/assets/{logs-panel-Cnp9tO_1.js → logs-panel-C70PjyAu.js} +1 -1
- package/dist/assets/{markdown-renderer-BSrbBHwX.js → markdown-renderer-D2XRRGdl.js} +1 -1
- package/dist/assets/{mode-yhfN-4ye.js → mode-j1jRJgw_.js} +1 -1
- package/dist/assets/{name-cell-input-CmuWqgFR.js → name-cell-input-XHY7Ji2w.js} +1 -1
- package/dist/assets/{outline-panel-DCfj1bI-.js → outline-panel-DmehVoPZ.js} +1 -1
- package/dist/assets/{packages-panel-BiEckVdM.js → packages-panel-D8Dc0jXW.js} +1 -1
- package/dist/assets/{panels-BXRys72u.js → panels-DOPj-FZ7.js} +1 -1
- package/dist/assets/{process-output-wGlHkL-Q.js → process-output-DZorMbgK.js} +1 -1
- package/dist/assets/{readonly-python-code-xbh7G2Y2.js → readonly-python-code-CzWlUPo8.js} +1 -1
- package/dist/assets/{run-page-BCwJRhCq.js → run-page-B7UH5d5F.js} +1 -1
- package/dist/assets/{scratchpad-panel-ByFq6zUA.js → scratchpad-panel-BvjbLs06.js} +1 -1
- package/dist/assets/{session-panel-DuQl_oQp.js → session-panel-Cg2ez0A-.js} +1 -1
- package/dist/assets/{snippets-panel-R_ql6HGu.js → snippets-panel-BCzTzB9R.js} +1 -1
- package/dist/assets/{state-DEHWsmkM.js → state-BxWZf58F.js} +1 -1
- package/dist/assets/{state-DXAf-ejz.js → state-Eihpi8Gd.js} +1 -1
- package/dist/assets/{switch-CWzL-0WF.js → switch-Bf7BdNuP.js} +1 -1
- package/dist/assets/{textarea-CfvBt_Xm.js → textarea-BRmAhRr_.js} +1 -1
- package/dist/assets/{tracing-Kscqc1t3.js → tracing-1SYqHZWJ.js} +1 -1
- package/dist/assets/{tracing-panel-BEzOflWc.js → tracing-panel-Bcs0pfdJ.js} +2 -2
- package/dist/assets/{types-DhuSHMNQ.js → types-Dqr8wUa4.js} +1 -1
- package/dist/assets/{useAddCell-C9lbOVO1.js → useAddCell-BEZy0w8u.js} +1 -1
- package/dist/assets/{useCellActionButton-fsh9MTAX.js → useCellActionButton-BPZZpi7i.js} +1 -1
- package/dist/assets/{useDeleteCell-ByImoTpm.js → useDeleteCell-BIkFVvVx.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-CngFbla0.js → useDependencyPanelTab-B4L5DuIf.js} +1 -1
- package/dist/assets/{useNotebookActions-D01w160c.js → useNotebookActions-N9jfUrVW.js} +1 -1
- package/dist/assets/{useRunCells-CmnSPQtM.js → useRunCells-d0gYuXYQ.js} +1 -1
- package/dist/assets/{useSplitCell-BTH64tve.js → useSplitCell-DGmYA9dE.js} +1 -1
- package/dist/assets/{utilities.esm-CMQs6YPp.js → utilities.esm-Bs_5S-OE.js} +1 -1
- package/dist/index.html +31 -31
- package/package.json +2 -2
- package/src/components/chat/acp/agent-panel.tsx +56 -43
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +27 -0
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +6 -0
- package/src/core/cells/scrollCellIntoView.ts +3 -2
- package/src/plugins/impl/chat/chat-ui.tsx +16 -4
- package/dist/assets/index-qglXvdF9.js +0 -43
|
@@ -19,6 +19,12 @@ export function useFocusFirstEditor() {
|
|
|
19
19
|
const timeout = setTimeout(() => {
|
|
20
20
|
// Let the DOM render
|
|
21
21
|
requestAnimationFrame(() => {
|
|
22
|
+
// Skip auto-focus if the document doesn't have focus to avoid
|
|
23
|
+
// stealing focus from outside (e.g., when embedded in an iframe)
|
|
24
|
+
if (!document.hasFocus()) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
22
28
|
// Check if the URL contains a scrollTo parameter
|
|
23
29
|
const hash = window.location.hash;
|
|
24
30
|
const cellName = extractCellNameFromHash(hash);
|
|
@@ -53,8 +53,9 @@ export function focusAndScrollCellIntoView({
|
|
|
53
53
|
Logger.warn("scrollCellIntoView: editor not found", cellId);
|
|
54
54
|
return;
|
|
55
55
|
}
|
|
56
|
-
//
|
|
57
|
-
|
|
56
|
+
// Skip auto-focus if already focused, or if the document doesn't have
|
|
57
|
+
// focus to avoid stealing focus from outside (e.g., when embedded in an iframe)
|
|
58
|
+
if (editor.hasFocus || !document.hasFocus()) {
|
|
58
59
|
return;
|
|
59
60
|
}
|
|
60
61
|
|
|
@@ -75,12 +75,26 @@ interface Props extends PluginFunctions {
|
|
|
75
75
|
export const Chatbot: React.FC<Props> = (props) => {
|
|
76
76
|
const [input, setInput] = useState("");
|
|
77
77
|
const [config, setConfig] = useState<ChatConfig>(props.config);
|
|
78
|
+
const [prevPropsConfig, setPrevPropsConfig] = useState<ChatConfig>(
|
|
79
|
+
props.config,
|
|
80
|
+
);
|
|
78
81
|
const [files, setFiles] = useState<File[] | undefined>(undefined);
|
|
79
82
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
|
80
83
|
const formRef = useRef<HTMLFormElement>(null);
|
|
81
84
|
const codeMirrorInputRef = useRef<ReactCodeMirrorRef>(null);
|
|
82
85
|
const scrollContainerRef = useRef<HTMLDivElement>(null);
|
|
83
86
|
|
|
87
|
+
const configChanged = Object.keys(props.config).some(
|
|
88
|
+
(key) =>
|
|
89
|
+
props.config[key as keyof ChatConfig] !==
|
|
90
|
+
prevPropsConfig[key as keyof ChatConfig],
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
if (configChanged) {
|
|
94
|
+
setConfig(props.config);
|
|
95
|
+
setPrevPropsConfig(props.config);
|
|
96
|
+
}
|
|
97
|
+
|
|
84
98
|
// Use a ref to avoid stale closure in the fetch callback
|
|
85
99
|
const configRef = useRef<ChatConfig>(config);
|
|
86
100
|
configRef.current = config;
|
|
@@ -739,7 +753,6 @@ const ConfigPopup: React.FC<{
|
|
|
739
753
|
config: ChatConfig;
|
|
740
754
|
onChange: (newConfig: ChatConfig) => void;
|
|
741
755
|
}> = ({ config, onChange }) => {
|
|
742
|
-
const [localConfig, setLocalConfig] = useState<ChatConfig>(config);
|
|
743
756
|
const [open, setOpen] = useState(false);
|
|
744
757
|
|
|
745
758
|
const handleChange = (key: keyof ChatConfig, value: number | null) => {
|
|
@@ -754,8 +767,7 @@ const ConfigPopup: React.FC<{
|
|
|
754
767
|
finalValue = clampedValue;
|
|
755
768
|
}
|
|
756
769
|
|
|
757
|
-
const newConfig = { ...
|
|
758
|
-
setLocalConfig(newConfig);
|
|
770
|
+
const newConfig = { ...config, [key]: finalValue };
|
|
759
771
|
onChange(newConfig);
|
|
760
772
|
};
|
|
761
773
|
|
|
@@ -782,7 +794,7 @@ const ConfigPopup: React.FC<{
|
|
|
782
794
|
<PopoverContent className="w-70 border">
|
|
783
795
|
<div className="grid gap-3">
|
|
784
796
|
<h4 className="font-bold leading-none">Configuration</h4>
|
|
785
|
-
{Objects.entries(
|
|
797
|
+
{Objects.entries(config).map(([key, value]) => (
|
|
786
798
|
<div key={key} className="grid grid-cols-3 items-center gap-1">
|
|
787
799
|
<Label
|
|
788
800
|
htmlFor={key}
|