Add generative panels, provider settings UI, and credits
Frontend: - tools/ai_replace_selection.js: use any selection → remote inpaint with prompt - modules/generate/text_to_image.js: Text → Image dialog (new layer or replace canvas) - modules/generate/outpaint.js: Expand Canvas in any direction via remote provider - modules/tools/ai_provider_settings.js: in-app provider config (OpenAI / InvokeAI / ComfyUI / Replicate); persists to localStorage, pushes to POST /api/config at runtime - config.js: register ai_replace_selection tool - config-menu.js: add Generate menu (Text→Image, Outpaint); AI Provider Settings under Tools - modules/help/about.js: updated credits (LaMa, rembg, SAM, InvokeAI, ComfyUI, OpenAI) - api/capabilities.js: add refreshCapabilities() for post-save cache invalidation Backend: - routers/ai_tools.py: POST /api/config — apply provider settings at runtime without restart (session-scoped, non-persistent; .env for permanence) https://claude.ai/code/session_01B58MaJCU1R6KwBDJCp8AfN
This commit is contained in:
@@ -48,9 +48,18 @@ export function hasRemote() {
|
||||
return !!(_caps?.remote?.healthy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invalidate cache and re-fetch (call after saving provider settings).
|
||||
*/
|
||||
export async function refreshCapabilities() {
|
||||
_caps = null;
|
||||
_fetchPromise = null;
|
||||
return getCapabilities();
|
||||
}
|
||||
|
||||
/**
|
||||
* Kick off the fetch immediately at module load time so it's ready when tools need it.
|
||||
*/
|
||||
getCapabilities();
|
||||
|
||||
export default { getCapabilities, getCachedCapabilities, hasRemote };
|
||||
export default { getCapabilities, getCachedCapabilities, hasRemote, refreshCapabilities };
|
||||
|
||||
Reference in New Issue
Block a user