chore: linting

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-06-09 00:42:26 -07:00
parent 0a012dbc79
commit ce952d2ad1
127 changed files with 821 additions and 517 deletions

View file

@ -35,9 +35,7 @@ export const MCPTrustedTools: FC<MCPTrustedToolsProps> = ({ connector }) => {
return (
<div className="space-y-4">
<h3 className="font-medium text-sm sm:text-base flex items-center gap-2">
Trusted Tools
</h3>
<h3 className="font-medium text-sm sm:text-base flex items-center gap-2">Trusted Tools</h3>
<div className="rounded-xl border border-border bg-slate-400/5 dark:bg-white/5 p-3 sm:p-6 space-y-4">
<p className="text-[10px] sm:text-xs text-muted-foreground">

View file

@ -278,7 +278,10 @@ export const ConnectorEditView: FC<ConnectorEditViewProps> = ({
{/* Vision toggle (Obsidian is plugin-push, non-indexable by design) */}
{showsVisionToggle && (
<VisionLLMConfig enabled={enableVisionLlm} onEnabledChange={onEnableVisionLlmChange} />
<VisionLLMConfig
enabled={enableVisionLlm}
onEnabledChange={onEnableVisionLlmChange}
/>
)}
{/* Date-range and periodic sync stay indexable-only */}
@ -310,11 +313,13 @@ export const ConnectorEditView: FC<ConnectorEditViewProps> = ({
connector.connector_type === "COMPOSIO_GOOGLE_DRIVE_CONNECTOR";
const requiresFolderSelection = isGoogleDrive || isComposioGoogleDrive;
const selectedFolders =
(connector.config?.selected_folders as Array<{ id: string; name: string }> | undefined) ||
[];
(connector.config?.selected_folders as
| Array<{ id: string; name: string }>
| undefined) || [];
const selectedFiles =
(connector.config?.selected_files as Array<{ id: string; name: string }> | undefined) ||
[];
(connector.config?.selected_files as
| Array<{ id: string; name: string }>
| undefined) || [];
const hasItemsSelected = selectedFolders.length > 0 || selectedFiles.length > 0;
const isDisabled = requiresFolderSelection && !hasItemsSelected;

View file

@ -177,7 +177,10 @@ export const IndexingConfigurationView: FC<IndexingConfigurationViewProps> = ({
{/* Vision toggle (Obsidian is plugin-push, non-indexable by design) */}
{showsVisionToggle && (
<VisionLLMConfig enabled={enableVisionLlm} onEnabledChange={onEnableVisionLlmChange} />
<VisionLLMConfig
enabled={enableVisionLlm}
onEnabledChange={onEnableVisionLlmChange}
/>
)}
{/* Date-range and periodic sync stay indexable-only */}

View file

@ -654,7 +654,7 @@ export const useConnectorDialog = () => {
setConnectorConfig(connector.config || {});
setPeriodicEnabled(false);
setFrequencyMinutes("1440");
setEnableVisionLlm(connector.enable_vision_llm ?? false);
setEnableVisionLlm(connector.enable_vision_llm ?? false);
setStartDate(undefined);
setEndDate(undefined);
@ -808,7 +808,7 @@ export const useConnectorDialog = () => {
await updateConnector({
id: indexingConfig.connectorId,
data: {
enable_vision_llm: enableVisionLlm,
enable_vision_llm: enableVisionLlm,
...(periodicEnabled && {
periodic_indexing_enabled: true,
indexing_frequency_minutes: frequency,

View file

@ -2,9 +2,9 @@
import {
FilePlus2,
type LucideIcon,
Search,
Settings2,
type LucideIcon,
WandSparkles,
Workflow,
X,
@ -55,7 +55,31 @@ export function ChatExamplePrompts({ onSelect }: ChatExamplePromptsProps) {
return (
<div className="mt-2 w-full select-none sm:mt-3">
{activeCategory ? null : (
{activeCategory ? (
<div>
<div className="flex items-center gap-2 px-0.5 pb-2">
<Button
type="button"
variant="secondary"
onClick={() => setActiveCategoryId(null)}
className="h-8 rounded-lg bg-muted px-3 text-xs font-medium text-muted-foreground shadow-sm shadow-black/5 hover:bg-foreground/10 hover:text-foreground dark:shadow-black/10 sm:h-10 sm:rounded-xl sm:px-4 sm:text-sm"
>
<X aria-hidden="true" className="size-3.5 sm:size-4" />
Back
</Button>
<span className="text-sm font-medium text-foreground">{activeCategory.label}</span>
</div>
<ScrollArea className="h-[clamp(7.5rem,26vh,12rem)]">
<ul className="flex flex-col gap-2 pr-3">
{activeCategory.prompts.map((prompt) => (
<li key={prompt}>
<ExamplePromptButton prompt={prompt} onSelect={onSelect} />
</li>
))}
</ul>
</ScrollArea>
</div>
) : (
<div className="pb-1">
<div className="mx-auto flex max-w-full flex-wrap items-center justify-center gap-1.5 px-0.5 sm:gap-2">
{CHAT_EXAMPLE_CATEGORIES.map((category) => {
@ -76,24 +100,7 @@ export function ChatExamplePrompts({ onSelect }: ChatExamplePromptsProps) {
})}
</div>
</div>
{CHAT_EXAMPLE_CATEGORIES.map((category) => (
<TabsContent
key={category.id}
value={category.id}
className="mt-3 focus-visible:outline-none"
>
<ScrollArea className="h-[clamp(7.5rem,26vh,12rem)]">
<ul className="flex flex-col gap-2 pr-3">
{category.prompts.map((prompt) => (
<li key={prompt}>
<ExamplePromptButton prompt={prompt} onSelect={onSelect} />
</li>
))}
</ul>
</ScrollArea>
</TabsContent>
))}
</Tabs>
)}
</div>
);
}
}

View file

@ -138,7 +138,7 @@ export function LLMRoleManager({ searchSpaceId }: LLMRoleManagerProps) {
useEffect(() => {
setAssignments({
agent_llm_id: preferences.agent_llm_id ?? null,
image_generation_config_id: preferences.image_generation_config_id ?? null,
image_generation_config_id: preferences.image_generation_config_id ?? null,
vision_llm_config_id: preferences.vision_llm_config_id ?? null,
});
}, [

View file

@ -693,7 +693,6 @@ export function DocumentUploadTab({
</div>
)}
<div className={toggleRowClass}>
<div className="space-y-0.5">
<p className="font-medium text-sm">Enable Vision LLM</p>

View file

@ -119,19 +119,13 @@ export function FolderWatchDialog({
setSubmitting(false);
setProgress(null);
}
}, [
selectedFolder,
searchSpaceId,
supportedExtensions,
onOpenChange,
onSuccess,
]);
}, [selectedFolder, searchSpaceId, supportedExtensions, onOpenChange, onSuccess]);
const handleOpenChange = useCallback(
(nextOpen: boolean) => {
if (!nextOpen && !submitting) {
setSelectedFolder(null);
setProgress(null);
setProgress(null);
}
onOpenChange(nextOpen);
},
@ -200,7 +194,6 @@ export function FolderWatchDialog({
{selectedFolder && (
<>
{progressLabel && (
<div className="rounded-lg bg-slate-400/5 dark:bg-white/5 px-3 py-2">
<p className="text-xs text-muted-foreground">{progressLabel}</p>