The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
feat(video): unlock video generation in chat Tools + Coding Agent
purplecbd5c805582b
diff --git a/src/api/__tests__/tool-registry.test.ts b/src/api/__tests__/tool-registry.test.tsindex 5917ff1d..e0906228 100644--- a/src/api/__tests__/tool-registry.test.ts+++ b/src/api/__tests__/tool-registry.test.ts@@ -117,10 +117,10 @@ describe('getOllamaTools', () => {expect(ollamaTools).toHaveLength(AGENT_TOOL_DEFS.length - blockedByDefaultNames.size)})- it('excludes video_generate (off by default) but keeps image_generate', () => {+ it('includes video_generate (live since v2.5.3) alongside image_generate', () => {const names = getOllamaTools().map((t) => t.function.name)- expect(blockedByDefaultNames.has('video_generate')).toBe(true)- expect(names).not.toContain('video_generate')+ expect(blockedByDefaultNames.has('video_generate')).toBe(false)+ expect(names).toContain('video_generate')expect(names).toContain('image_generate')})diff --git a/src/api/mcp/types.ts b/src/api/mcp/types.tsindex dacdbfec..c584b197 100644--- a/src/api/mcp/types.ts+++ b/src/api/mcp/types.ts@@ -13,11 +13,11 @@ export const DEFAULT_PERMISSIONS: PermissionMap = {web: 'auto',system: 'auto',image: 'confirm',- // Video generation is turned OFF for now (David 2026-06-04). 'blocked'- // removes video_generate from the tool list every model sees (see the- // tool-selection / tool-registry filters), so it is never offered. The- // chat Tools menu also locks the toggle. Flip back to 'confirm' to re-enable.- video: 'blocked',+ // Video generation went LIVE in v2.5.3 (T2V via Wan/Hunyuan/AnimateDiff,+ // I2V via SVD/FramePack — David 2026-06-10 "T2V und I2V klappen beide+ // problemlos"). Same confirm-gate as image. permissionStore migrates the+ // old persisted 'blocked' (which was UI-locked, never a user choice) up.+ video: 'confirm',workflow: 'confirm',}diff --git a/src/components/chat/PermissionOverrideBar.tsx b/src/components/chat/PermissionOverrideBar.tsxindex 8c430ff9..008e1b83 100644--- a/src/components/chat/PermissionOverrideBar.tsx+++ b/src/components/chat/PermissionOverrideBar.tsx@@ -4,11 +4,10 @@ import type { ToolCategory } from '../../api/mcp/types'import { useImageToolNoti } from '../../hooks/useImageToolNoti'import { FolderOpen, Terminal, Monitor, Globe, Cpu, Image, Film, GitBranch, Lock } from 'lucide-react'-// Image generation is LIVE (chat agent → ComfyUI). Video generation is turned-// OFF for now (David 2026-06-04): it stays in the menu but greyed-out,-// struck-through and not clickable via the LOCKED set, and `video` defaults to-// 'blocked' in DEFAULT_PERMISSIONS so the tool is never offered to the model.-const LOCKED: Set<ToolCategory> = new Set(['video'])+// Image AND video generation are LIVE (chat agent → ComfyUI; video unlocked+// in v2.5.3 — T2V via Wan/Hunyuan/AnimateDiff, I2V via SVD/FramePack). The+// LOCKED set stays as the mechanism for future not-yet-shipped categories.+const LOCKED: Set<ToolCategory> = new Set()const CATEGORIES: { key: ToolCategory; icon: typeof Globe; label: string }[] = [{ key: 'web', icon: Globe, label: 'Web' },diff --git a/src/hooks/useAgentChat.ts b/src/hooks/useAgentChat.tsindex 3a657d5d..1dbc5a85 100644--- a/src/hooks/useAgentChat.ts+++ b/src/hooks/useAgentChat.ts@@ -1280,7 +1280,7 @@ Available tools:- Filesystem: file_read, file_write, file_list, file_search- Web: web_search, web_fetch- System: shell_execute, code_execute, system_info, screenshot, process_list, get_current_time-- Creative: image_generate, run_workflow+- Creative: image_generate, video_generate (text-to-video, or animate a generated image via inputImage), run_workflowAUTONOMY CONTRACT (read carefully — this is the most important rule):- When the user asks you to BUILD, CREATE, MAKE, or WRITE something (a file, a website, a script, a folder structure), you MUST execute it via tools — typically file_write.diff --git a/src/hooks/useCodex.ts b/src/hooks/useCodex.tsindex 3529ed44..d0746812 100644--- a/src/hooks/useCodex.ts+++ b/src/hooks/useCodex.ts@@ -57,7 +57,7 @@ const CODEX_REVIEW_SYSTEM_PROMPT = `You are the Coding Agent in REVIEW MODE —REVIEW MODE CONTRACT (binding):- You MAY call: file_read, file_list, file_search, git_status, git_log, git_diff, system_info, process_list, get_current_time, web_fetch, web_search.-- You MUST NOT call: file_write, shell_execute, code_execute, run_tests, git_commit, git_push, gh_pr_create, image_generate, run_workflow, screenshot, delegate_task. If you call them, the harness will reject the call and tell the model "review-only mode" — wasted budget.+- You MUST NOT call: file_write, shell_execute, code_execute, run_tests, git_commit, git_push, gh_pr_create, image_generate, video_generate, run_workflow, screenshot, delegate_task. If you call them, the harness will reject the call and tell the model "review-only mode" — wasted budget.- Output format: a markdown report with sections "## Summary", "## Findings (priority order)", "## Suggested follow-ups". For each finding cite the file + line range (path:line or path:start-end).- Be direct. No flattery, no boilerplate. If the code is fine, say so in one sentence and stop.`@@ -85,6 +85,7 @@ Rules:- Chain tool calls: after each tool result, if there is another step left, IMMEDIATELY call the next tool- If a command fails, diagnose and retry with a different approach — don't hand back to the user unless truly stuck- Be concise in text. All the work happens in tool calls.+- Asset generation: when the task needs an image or a short video (placeholder art, hero image, demo clip), call image_generate / video_generate as a real tool call — ComfyUI runs locally. To animate a generated image, call video_generate with inputImage set to that image's filename.- FINISH with a short natural-language sentence summarising what you did or found. NEVER end your turn with only a raw JSON object or a bare code block — the user needs a human-readable answer, not a data dump.`// Small-Model Mode (Knob 2): a lean Codex prompt (~500 chars vs ~1700 above)@@ -108,8 +109,11 @@ Rules:// without a code duplicate. Kept under the same name to minimise diff.const streamWithTools = streamOllamaChatWithTools-// Coding-relevant tool categories-const CODEX_CATEGORIES = ['filesystem', 'terminal', 'system', 'web'] as const+// Coding-relevant tool categories. image/video joined in v2.5.3 (David:+// "Video generation auf simplen Prompt in Code und Agentmode") — they only+// surface when the keyword router sees a creative intent in the prompt, so+// pure coding turns keep the same lean tool list as before.+const CODEX_CATEGORIES = ['filesystem', 'terminal', 'system', 'web', 'image', 'video'] as const// Tools blocked in Code-Review Mode (B13). The agent goes read-only —// it inspects the codebase and writes inline comments, but never@@ -130,6 +134,7 @@ const REVIEW_MODE_FORBIDDEN_TOOLS = new Set(['gh_pr_create','run_tests','image_generate',+ 'video_generate','run_workflow',// Parity with uselu's review blocklist — a reviewer must not capture the// screen or hand work off to a sub-agent that could mutate state.@@ -590,11 +595,12 @@ export function useCodex() {if (strategy === 'native') {const lastUserMsg = messages.filter(m => m.role === 'user').pop()?.content || ''- // CODEX_CATEGORIES filter: Codex is a CODING agent — image_generate,- // screenshot, process_list, run_workflow are distractions that pollute- // the tool list for small/3B models. Filter the registry by category- // BEFORE keyword routing so the model only ever sees filesystem,- // terminal, system, and web tools.+ // CODEX_CATEGORIES filter: Codex is a CODING agent — screenshot,+ // run_workflow etc. are distractions that pollute the tool list for+ // small/3B models. Filter the registry by category BEFORE keyword+ // routing. image/video are in the set since v2.5.3, but the keyword+ // router below only surfaces them on creative intents, so plain+ // coding turns keep the lean list.const codexToolsAll = toolRegistry.getAll().filter((t) => (CODEX_CATEGORIES as readonly string[]).includes(t.category),)diff --git a/src/stores/__tests__/permissionStore.test.ts b/src/stores/__tests__/permissionStore.test.tsindex a06f6b01..65b69bc3 100644--- a/src/stores/__tests__/permissionStore.test.ts+++ b/src/stores/__tests__/permissionStore.test.ts@@ -1,7 +1,36 @@import { describe, it, expect, beforeEach } from 'vitest'-import { usePermissionStore } from '../permissionStore'+import { usePermissionStore, migratePermissionState } from '../permissionStore'import { DEFAULT_PERMISSIONS } from '../../api/mcp/types'+// v2.5.3 — video generation went live. The default must not be 'blocked'+// anymore (it removes video_generate from every model's tool list), and the+// persist migration must lift the old locked-in 'blocked' for existing users.+describe('video category unlock (v2.5.3)', () => {+ it('DEFAULT_PERMISSIONS.video is confirm (same gate as image)', () => {+ expect(DEFAULT_PERMISSIONS.video).toBe('confirm')+ expect(DEFAULT_PERMISSIONS.image).toBe('confirm')+ })++ it('migrate lifts a persisted v1 video:blocked to the new default', () => {+ const persisted = {+ globalPermissions: { ...DEFAULT_PERMISSIONS, video: 'blocked', terminal: 'auto' },+ conversationOverrides: { c1: { web: 'blocked' } },+ }+ const migrated = migratePermissionState(persisted, 1)+ // The locked-in old default is lifted…+ expect(migrated.globalPermissions.video).toBe('confirm')+ // …while real user choices survive untouched.+ expect(migrated.globalPermissions.terminal).toBe('auto')+ expect(migrated.conversationOverrides.c1.web).toBe('blocked')+ })++ it('migrate is a no-op for current-version state', () => {+ const persisted = { globalPermissions: { ...DEFAULT_PERMISSIONS, video: 'blocked' } }+ const migrated = migratePermissionState(persisted, 2)+ expect(migrated.globalPermissions.video).toBe('blocked')+ })+})+describe('permissionStore', () => {beforeEach(() => {usePermissionStore.setState({diff --git a/src/stores/permissionStore.ts b/src/stores/permissionStore.tsindex 15d9a4df..186be845 100644--- a/src/stores/permissionStore.ts+++ b/src/stores/permissionStore.ts@@ -115,10 +115,26 @@ export const usePermissionStore = create<PermissionState>()(modeScope: 'agent',}),}),- { name: 'locally-uncensored-permissions' }+ {+ name: 'locally-uncensored-permissions',+ version: 2,+ migrate: migratePermissionState,+ }))+/** v2 (v2.5.3): video generation went live — the category was 'blocked'+ * AND UI-locked since 2026-06-04, so a persisted 'blocked' can only be the+ * old default, never a user's choice (the toggle was disabled). Lift exactly+ * that value to the new default; everything else persists. Exported for+ * direct unit-testing (the persist internals aren't reachable in vitest). */+export function migratePermissionState(persisted: any, version: number) {+ if (version < 2 && persisted?.globalPermissions?.video === 'blocked') {+ persisted.globalPermissions.video = DEFAULT_PERMISSIONS.video+ }+ return persisted+}+/*** Tool categories allowed by each mode scope (Phase 12). Keep these* conservative — a more permissive scope only adds categories that the