Move imageModel to VFS

This commit is contained in:
Alex Gleason committed 2025-12-07 03:04:02 -06:00
1 parent 16b49e82bb
commit 8b1f2e381c
7 files changed
+11 -22

No files matched your search

+1 -1
View File
@@ -172,7 +172,7 @@ export const AIMessageItem = memo(({
case 'generate_image':
return {
icon: Image,
title: args.prompt ? `Generated: ${args.prompt.slice(0, 40)}${args.prompt.length > 40 ? '...' : ''}` : 'Generated Image'
title: args.prompt ? `Generated: ${args.prompt}` : 'Generated Image'
};
default:
return {
-1
View File
@@ -50,7 +50,6 @@ const AppConfigSchema = z.object({
sentryDsn: z.string(),
sentryEnabled: z.boolean(),
systemPrompt: z.string(),
imageModel: z.string(),
}) satisfies z.ZodType<AppConfig>;
export function AppProvider(props: AppProviderProps) {
+3 -3
View File
@@ -186,9 +186,9 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
}
// Add generate_image tool if imageModel is configured
if (config.imageModel) {
if (settings.imageModel) {
try {
const { provider, model } = parseProviderModel(config.imageModel, settings.providers);
const { provider, model } = parseProviderModel(settings.imageModel, settings.providers);
tools.generate_image = new GenerateImageTool(
fs,
tmpPath,
@@ -203,7 +203,7 @@ export const ChatPane = forwardRef<ChatPaneRef, ChatPaneProps>(({
}
return tools;
}, [fs, git, cwd, user, projectId, projectsPath, tmpPath, pluginsPath, config.corsProxy, config.imageModel, settings.providers, handleFileChanged]);
}, [fs, git, cwd, user, projectId, projectsPath, tmpPath, pluginsPath, config.corsProxy, settings.imageModel, settings.providers, handleFileChanged]);
// MCP tools wrapped for execution
const mcpToolWrappers = useMemo(() => createMCPTools(mcpClients), [mcpClients]);