Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix: csp issue that blocking image upload on Windows

Louisd5fe89e21459
diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json
index 27cffdcb9..e0a7a6041 100644
--- a/src-tauri/tauri.conf.json
+++ b/src-tauri/tauri.conf.json
@@ -47,7 +47,7 @@
],
"csp": {
"default-src": "'self' customprotocol: asset: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*",
- "connect-src": "'self' asset: ipc: http://asset.localhost http://ipc.localhost http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:* https: http:",
+ "connect-src": "'self' asset: ipc: data: http://asset.localhost http://ipc.localhost http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:* https: http:",
"font-src": [
"https://fonts.gstatic.com blob: data: tauri://localhost http://tauri.localhost"
],
diff --git a/web-app/src/routes/threads/$threadId.tsx b/web-app/src/routes/threads/$threadId.tsx
index 73a75d2dd..000dea352 100644
--- a/web-app/src/routes/threads/$threadId.tsx
+++ b/web-app/src/routes/threads/$threadId.tsx
@@ -788,7 +788,7 @@ function ThreadDetail() {
<p className="text-sm font-medium text-destructive mb-1">
Error generating response
</p>
- <p className="text-sm text-main-view-fg/70">
+ <p className="text-sm text-main-view-fg/70 truncate">
{error.message}
</p>
{(error.message.toLowerCase().includes('context') &&