mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Move imageModel to VFS
This commit is contained in:
7 files changed
+11
-22
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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]);
|
||||
|
||||
Reference in new issue
Block a user