Skip to content

Commit b345711

Browse files
committed
add more linking to providers page
1 parent 92f89d4 commit b345711

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

frontend/src/components/chat/chat-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ const ChatPanel = () => {
433433
return (
434434
<PanelEmptyState
435435
title="Chat with AI"
436-
description="No AI provider configured or model selected"
436+
description="No AI provider configured or Chat model not selected"
437437
action={
438438
<Button
439439
variant="outline"

frontend/src/components/editor/ai/add-cell-with-ai.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ export const AddCellWithAI: React.FC<{
272272
triggerClassName="h-7 text-xs max-w-64"
273273
iconSize="small"
274274
forRole="edit"
275+
showAddCustomModelDocs={true}
275276
/>
276277
</div>
277278
</div>

frontend/src/components/editor/ai/ai-completion-editor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ export const AiCompletionEditor: React.FC<Props> = ({
363363
iconSize="small"
364364
forRole="edit"
365365
displayIconOnly={true}
366+
placeholder="Edit model"
366367
/>
367368
</div>
368369
{completion && (

frontend/src/components/editor/renderers/cell-array.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
SquareMIcon,
1414
} from "lucide-react";
1515
import { useEffect } from "react";
16+
import { useOpenSettingsToTab } from "@/components/app-config/state";
1617
import { StartupLogsAlert } from "@/components/editor/alerts/startup-logs-alert";
1718
import { Cell } from "@/components/editor/notebook-cell";
1819
import { PackageAlert } from "@/components/editor/package-alert";
@@ -253,6 +254,7 @@ const AddCellButtons: React.FC<{
253254
const [isAiButtonOpen, isAiButtonOpenActions] = useBoolean(false);
254255
const aiEnabled = useAtomValue(aiEnabledAtom);
255256
const canInteractWithApp = useAtomValue(canInteractWithAppAtom);
257+
const { handleClick } = useOpenSettingsToTab();
256258

257259
const buttonClass = cn(
258260
"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<{
320322
</Button>
321323
<Tooltip
322324
content={
323-
aiEnabled ? null : <span>Enable via settings under AI Assist</span>
325+
aiEnabled ? null : (
326+
<span>AI provider not found or Edit model not selected</span>
327+
)
324328
}
325329
delayDuration={100}
326330
asChild={false}
@@ -329,8 +333,12 @@ const AddCellButtons: React.FC<{
329333
className={buttonClass}
330334
variant="text"
331335
size="sm"
332-
disabled={!aiEnabled || !canInteractWithApp}
333-
onClick={isAiButtonOpenActions.toggle}
336+
disabled={!canInteractWithApp}
337+
onClick={
338+
aiEnabled
339+
? isAiButtonOpenActions.toggle
340+
: () => handleClick("ai", "ai-providers")
341+
}
334342
>
335343
<SparklesIcon className="mr-2 size-4 shrink-0" />
336344
Generate with AI

0 commit comments

Comments
 (0)