feat: move settings for context menu and markdown image handling to BasicSettings (#1810)

This commit is contained in:
Logan Yang 2025-09-11 16:50:22 -07:00 committed by GitHub
parent 5d93e6159d
commit b6da24d5ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 21 additions and 21 deletions

View file

@ -343,6 +343,26 @@ export const BasicSettings: React.FC = () => {
onCheckedChange={(checked) => updateSetting("autosaveChat", checked)}
/>
<SettingItem
type="switch"
title="Include Current Note in Context Menu"
description="Automatically include the current note in the chat context menu by default when sending messages to the AI."
checked={settings.includeActiveNoteAsContext}
onCheckedChange={(checked) => {
updateSetting("includeActiveNoteAsContext", checked);
}}
/>
<SettingItem
type="switch"
title="Images in Markdown"
description="Pass embedded images in markdown to the AI along with the text. Only works with multimodal models."
checked={settings.passMarkdownImages}
onCheckedChange={(checked) => {
updateSetting("passMarkdownImages", checked);
}}
/>
<SettingItem
type="switch"
title="Suggested Prompts"

View file

@ -11,13 +11,13 @@ import {
} from "@/components/ui/select";
import { SettingItem } from "@/components/ui/setting-item";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { ToolSettingsSection } from "./ToolSettingsSection";
import { AUTOCOMPLETE_CONFIG } from "@/constants";
import { cn } from "@/lib/utils";
import { updateSetting, useSettingsValue } from "@/settings/model";
import { HelpCircle, RefreshCw } from "lucide-react";
import { Notice } from "obsidian";
import React, { useState } from "react";
import { ToolSettingsSection } from "./ToolSettingsSection";
export const CopilotPlusSettings: React.FC = () => {
const settings = useSettingsValue();
@ -78,26 +78,6 @@ export const CopilotPlusSettings: React.FC = () => {
</Badge>
</div>
<div className="tw-flex tw-flex-col tw-gap-4">
<SettingItem
type="switch"
title="Include Current Note in Context Menu"
description="Automatically include the current note in the chat context menu by default when sending messages to the AI."
checked={settings.includeActiveNoteAsContext}
onCheckedChange={(checked) => {
updateSetting("includeActiveNoteAsContext", checked);
}}
/>
<SettingItem
type="switch"
title="Images in Markdown"
description="Pass embedded images in markdown to the AI along with the text. Only works with multimodal models."
checked={settings.passMarkdownImages}
onCheckedChange={(checked) => {
updateSetting("passMarkdownImages", checked);
}}
/>
<div className="tw-pt-4 tw-text-xl tw-font-semibold">Autonomous Agent</div>
<SettingItem