-
Notifications
You must be signed in to change notification settings - Fork 673
feat(workspace): expose workspace switcher on desktop/local for credit selection #15051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
959d083
ed6e810
839d4ec
d5d1ee4
b679c80
d397f7a
5b36083
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -161,6 +161,25 @@ const DEV_SERVER_COMFYUI_URL = | |
| const cloudProxyConfig = | ||
| DISTRIBUTION === 'cloud' ? { secure: false, changeOrigin: true } : {} | ||
|
|
||
| // Workspace/auth routes only exist on the cloud gateway. On non-cloud dev | ||
| // against a local ComfyUI backend, set WORKSPACE_DEV_PROXY (e.g. | ||
| // https://cloud.comfy.org) to route them there so the workspace switcher can | ||
| // be exercised; everything else keeps hitting DEV_SERVER_COMFYUI_URL. | ||
| const WORKSPACE_DEV_PROXY = process.env.WORKSPACE_DEV_PROXY | ||
| const workspaceDevProxyConfig = WORKSPACE_DEV_PROXY | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
# Expectation: the repository either loads this value with loadEnv
# or documents a shell-exported configuration.
rg -n --hidden --glob '!.git' 'WORKSPACE_DEV_PROXY|loadEnv|dotenv' .Repository: Comfy-Org/ComfyUI_frontend Length of output: 1888 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- vite.config.mts ---'
sed -n '1,35p;155,190p;280,300p' vite.config.mts
printf '%s\n' '--- environment files and documentation references ---'
find . -maxdepth 3 -type f \( -name '.env*' -o -name 'README*' -o -name '*example*' \) -print
rg -n --hidden --glob '!.git' 'WORKSPACE_DEV_PROXY|\.env\.local|dotenvConfig|loadEnv' \
README* docs .github package.json vite.config.mts apps 2>/dev/null || trueRepository: Comfy-Org/ComfyUI_frontend Length of output: 4622 Load 🤖 Prompt for AI AgentsSource: MCP tools |
||
| ? Object.fromEntries( | ||
| [ | ||
| '/api/workspaces', | ||
| '/api/workspace', | ||
| '/api/auth/token', | ||
| '/api/auth/session' | ||
| ].map((route) => [ | ||
| route, | ||
| { target: WORKSPACE_DEV_PROXY, secure: false, changeOrigin: true } | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
| ]) | ||
| ) | ||
| : {} | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| function handleGcsRedirect( | ||
| proxyRes: IncomingMessage, | ||
| _req: IncomingMessage, | ||
|
|
@@ -267,6 +286,8 @@ export default defineConfig({ | |
| } | ||
| : {}), | ||
|
|
||
| ...workspaceDevProxyConfig, | ||
|
|
||
| '/api': { | ||
| target: DEV_SERVER_COMFYUI_URL, | ||
| ...cloudProxyConfig, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.