• Mohamed Aziz Mejri's avatar
    Custom theme generator (#2182) · dc9acbd6
    Mohamed Aziz Mejri 提交于
    <!-- This is an auto-generated description by cubic. -->
    ---
    ## Summary by cubic
    Prototype custom theme generator that lets users create themes manually
    or generate prompts from images, manage them from a new Themes page, and
    apply them in chat. Themes are global and used in streaming and token
    counting.
    
    - **New Features**
      - Added custom_themes table.
    - Implemented IPC and hooks to list/create/update/delete themes with
    query cache invalidation.
    - New CustomThemeDialog with manual prompt entry and prompt generation
    from uploaded images and optional keywords; uses the selected model via
    Dyad Pro and requires Dyad Pro enabled.
      - New Themes page with CRUD, EditThemeDialog, and a sidebar link.
    - Updated chat Themes menu to show built-in plus recent custom themes,
    with “New Theme” and a “More themes” dialog; newly created themes
    auto-select and selection persists per app.
    
    - **Refactors**
    - Replaced getThemePrompt with async getThemePromptById to support
    custom theme IDs (custom:<id>); integrated in chat_stream and
    token_count handlers.
      - Whitelisted new IPC channels in preload.
    
    <sup>Written for commit 37d9e5f0c477e2bb0847df506450b45a25ab4874.
    Summary will update on new commits.</sup>
    
    <!-- End of auto-generated description by cubic. -->
    
    
    
    
    
    
    
    
    
    
    <!-- CURSOR_SUMMARY -->
    ---
    
    > [!NOTE]
    > Adds end-to-end custom theme support, including storage, IPC, UI, and
    chat/system-prompt integration.
    > 
    > - New `custom_themes` table (+ migration `0022_loving_wendigo`) and
    Drizzle schema `customThemes`
    > - IPC: moved/expanded theme handlers to
    `pro/main/ipc/handlers/themes_handlers.ts` with endpoints for
    `get/set-app-theme`, `get/create/update/delete` custom themes, image
    save/cleanup, and `generate-theme-prompt`; whitelisted channels in
    `preload`
    > - Hooks and client: `useCustomThemes` CRUD/generation hooks;
    `IpcClient` methods for custom themes, image handling, and generation
    > - UI: new `ThemesPage` with cards, `CustomThemeDialog` (AI + manual),
    `AIGeneratorTab` (image upload, model/mode, Pro-gated),
    `EditThemeDialog`, improved `DeleteConfirmationDialog`; added
    `LibraryList` and updated `app-sidebar` default Library route
    > - Chat: `AuxiliaryActionsMenu` shows built-in and recent custom
    themes, "New Theme" and "More themes"; auto-select newly created theme
    > - Prompt resolution: replaced `getThemePrompt` with async
    `getThemePromptById` (supports `custom:<id>`) in chat stream and token
    count handlers
    > - Routing: added `/themes` route; e2e tests for themes CRUD, AI
    generator flow/limits, and prompt library navigation
    > 
    > <sup>Written by [Cursor
    Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
    37d9e5f0c477e2bb0847df506450b45a25ab4874. This will update automatically
    on new commits. Configure
    [here](https://cursor.com/dashboard?tab=bugbot).</sup>
    <!-- /CURSOR_SUMMARY -->
    dc9acbd6
名称
最后提交
最后更新
.claude 正在载入提交数据...
.cursor/rules 正在载入提交数据...
.devcontainer 正在载入提交数据...
.github 正在载入提交数据...
.husky 正在载入提交数据...
assets 正在载入提交数据...
docs 正在载入提交数据...
drizzle 正在载入提交数据...
e2e-tests 正在载入提交数据...
makers 正在载入提交数据...
packages/@dyad-sh 正在载入提交数据...
scaffold 正在载入提交数据...
scripts 正在载入提交数据...
shared 正在载入提交数据...
src 正在载入提交数据...
testing 正在载入提交数据...
tools 正在载入提交数据...
worker 正在载入提交数据...
workers/tsc 正在载入提交数据...
.cursorignore 正在载入提交数据...
.env.example 正在载入提交数据...
.eslintrc.json 正在载入提交数据...
.gitattributes 正在载入提交数据...
.gitignore 正在载入提交数据...
.oxlintrc.json 正在载入提交数据...
.prettierignore 正在载入提交数据...
.prettierrc 正在载入提交数据...
AGENTS.md 正在载入提交数据...
CLA.md 正在载入提交数据...
CLAUDE.md 正在载入提交数据...
CONTRIBUTING.md 正在载入提交数据...
LICENSE 正在载入提交数据...
README.md 正在载入提交数据...
SECURITY.md 正在载入提交数据...
biome.json 正在载入提交数据...
components.json 正在载入提交数据...
drizzle.config.ts 正在载入提交数据...
forge.config.ts 正在载入提交数据...
forge.env.d.ts 正在载入提交数据...
index.html 正在载入提交数据...
lint-staged.config.js 正在载入提交数据...
merge.config.ts 正在载入提交数据...
package-lock.json 正在载入提交数据...
package.json 正在载入提交数据...
playwright.config.ts 正在载入提交数据...
tsconfig.app.json 正在载入提交数据...
tsconfig.json 正在载入提交数据...
tsconfig.node.json 正在载入提交数据...
vite.main.config.mts 正在载入提交数据...
vite.preload.config.mts 正在载入提交数据...
vite.renderer.config.mts 正在载入提交数据...
vite.worker.config.mts 正在载入提交数据...
vitest.config.ts 正在载入提交数据...