A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
add more linking to provider page (#8041)
Shahmir Varqha1fc155ca5d7c
diff --git a/frontend/src/components/app-config/ai-config.tsx b/frontend/src/components/app-config/ai-config.tsxindex 83c9453868..0c19fbfd89 100644--- a/frontend/src/components/app-config/ai-config.tsx+++ b/frontend/src/components/app-config/ai-config.tsx@@ -5,6 +5,7 @@ import {BotIcon,BrainIcon,ChevronRightIcon,+ InfoIcon,PlusIcon,Trash2Icon,} from "lucide-react";@@ -61,6 +62,7 @@ import {} from "../ui/accordion";import { Button } from "../ui/button";import { Checkbox } from "../ui/checkbox";+import { DropdownMenuSeparator } from "../ui/dropdown-menu";import { Label } from "../ui/label";import { ExternalLink } from "../ui/links";import {@@ -272,6 +274,32 @@ export const ModelSelector: React.FC<ModelSelectorProps> = ({placeholder={placeholder}onSelect={selectModel}triggerClassName="text-sm"+ customDropdownContent={+ <>+ <DropdownMenuSeparator />+ <p className="px-2 py-1.5 text-sm text-muted-secondary flex items-center gap-1">+ Enter a custom model+ <Tooltip content="Models should include the provider prefix, e.g. 'openai/gpt-4o'">+ <InfoIcon className="h-3 w-3" />+ </Tooltip>+ </p>+ <div className="px-2 py-1">+ <Input+ className="w-full border-border shadow-none focus-visible:shadow-xs"+ placeholder={placeholder}+ {...field}+ value={asStringOrEmpty(field.value)}+ onKeyDown={Events.stopPropagation()}+ />+ {value && (+ <IncorrectModelId+ value={value}+ includeSuggestion={false}+ />+ )}+ </div>+ </>+ }forRole={forRole}/></FormControl>diff --git a/frontend/src/components/chat/chat-panel.tsx b/frontend/src/components/chat/chat-panel.tsxindex 256f7164e3..f7cf6f6ba1 100644--- a/frontend/src/components/chat/chat-panel.tsx+++ b/frontend/src/components/chat/chat-panel.tsx@@ -433,7 +433,7 @@ const ChatPanel = () => {return (<PanelEmptyStatetitle="Chat with AI"- description="No AI provider configured or model selected"+ description="No AI provider configured or Chat model not selected"action={<Buttonvariant="outline"diff --git a/frontend/src/components/editor/ai/add-cell-with-ai.tsx b/frontend/src/components/editor/ai/add-cell-with-ai.tsxindex e00905a82d..38b5c65d92 100644--- a/frontend/src/components/editor/ai/add-cell-with-ai.tsx+++ b/frontend/src/components/editor/ai/add-cell-with-ai.tsx@@ -272,6 +272,7 @@ export const AddCellWithAI: React.FC<{triggerClassName="h-7 text-xs max-w-64"iconSize="small"forRole="edit"+ showAddCustomModelDocs={true}/></div></div>diff --git a/frontend/src/components/editor/ai/ai-completion-editor.tsx b/frontend/src/components/editor/ai/ai-completion-editor.tsxindex e35b141b1a..86b5ce8942 100644--- a/frontend/src/components/editor/ai/ai-completion-editor.tsx+++ b/frontend/src/components/editor/ai/ai-completion-editor.tsx@@ -363,6 +363,7 @@ export const AiCompletionEditor: React.FC<Props> = ({iconSize="small"forRole="edit"displayIconOnly={true}+ placeholder="Edit model"/></div>{completion && (diff --git a/frontend/src/components/editor/renderers/cell-array.tsx b/frontend/src/components/editor/renderers/cell-array.tsxindex 33cd86aa05..3bb0d055b4 100644--- a/frontend/src/components/editor/renderers/cell-array.tsx+++ b/frontend/src/components/editor/renderers/cell-array.tsx@@ -13,6 +13,7 @@ import {SquareMIcon,} from "lucide-react";import { useEffect } from "react";+import { useOpenSettingsToTab } from "@/components/app-config/state";import { StartupLogsAlert } from "@/components/editor/alerts/startup-logs-alert";import { Cell } from "@/components/editor/notebook-cell";import { PackageAlert } from "@/components/editor/package-alert";@@ -253,6 +254,7 @@ const AddCellButtons: React.FC<{const [isAiButtonOpen, isAiButtonOpenActions] = useBoolean(false);const aiEnabled = useAtomValue(aiEnabledAtom);const canInteractWithApp = useAtomValue(canInteractWithAppAtom);+ const { handleClick } = useOpenSettingsToTab();const buttonClass = cn("mb-0 rounded-none sm:px-4 md:px-5 lg:px-8 tracking-wide no-wrap whitespace-nowrap",@@ -320,7 +322,9 @@ const AddCellButtons: React.FC<{</Button><Tooltipcontent={- aiEnabled ? null : <span>Enable via settings under AI Assist</span>+ aiEnabled ? null : (+ <span>AI provider not found or Edit model not selected</span>+ )}delayDuration={100}asChild={false}@@ -329,8 +333,12 @@ const AddCellButtons: React.FC<{className={buttonClass}variant="text"size="sm"- disabled={!aiEnabled || !canInteractWithApp}- onClick={isAiButtonOpenActions.toggle}+ disabled={!canInteractWithApp}+ onClick={+ aiEnabled+ ? isAiButtonOpenActions.toggle+ : () => handleClick("ai", "ai-providers")+ }><SparklesIcon className="mr-2 size-4 shrink-0" />Generate with AI