mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
Introduce a shared randomId() helper in frontend/src/lib/utils that uses crypto.randomUUID when available and falls back to a unique id for non-secure contexts (e.g. HTTP origins where Web Crypto is unavailable). Replace the inline id generator in PromptInput and the direct crypto.randomUUID call in GitSettings ensureCredentialId with this shared helper so git credential save no longer throws in non-secure contexts. - utils: add randomId() with crypto.randomUUID fallback - PromptInput: replace local generateId with randomId for image attachment ids - GitSettings: use randomId in ensureCredentialId - Add unit tests for randomId covering both code paths