feat(chat): add local-first conversation workspace

This commit is contained in:
2026-08-13 15:55:15 +08:00
parent d1d50d722c
commit 8991f78f9f
43 changed files with 5450 additions and 592 deletions
+32 -5
View File
@@ -66,6 +66,7 @@ services:
BRIDGE_MODE: network
BRIDGE_SOCKET: /run/provider-proxy/ollama.sock
LISTEN_PORT: "11434"
UPSTREAM_HTTP_HOST: localhost:11434
volumes:
- ./proxy-bridge.mjs:/app/proxy-bridge.mjs:ro
- ./run:/run/provider-proxy
@@ -93,8 +94,10 @@ services:
KEY_VAULT_TOKEN_FILE: /run/secrets/portal_gateway_hmac
CHAT_DATABASE_PATH: /data/chat.db
PORTAL_URL: http://xiteng-site:8080
PUBLIC_PROVIDER_CATALOG_FILE: /app/providers.json
volumes:
- ../ai-gateway/secrets/portal_gateway_hmac:/run/secrets/portal_gateway_hmac:ro
- ../ai-gateway/providers.json:/app/providers.json:ro
- ./data:/data
security_opt:
- no-new-privileges:true
@@ -118,13 +121,37 @@ services:
- "traefik.http.routers.xiteng-chat.tls=true"
- "traefik.http.routers.xiteng-chat.tls.certresolver=cfresolver"
- "traefik.http.routers.xiteng-chat.service=xiteng-chat"
- "traefik.http.routers.xiteng-chat.middlewares=xiteng-chat-scheme,xiteng-chat-auth"
- "traefik.http.routers.xiteng-chat.middlewares=xiteng-chat-scheme"
- "traefik.http.routers.xiteng-chat.priority=300"
- "traefik.http.routers.xiteng-chat-api.rule=Host(`xiteng.site`) && PathPrefix(`/chat/api/`)"
- "traefik.http.routers.xiteng-chat-api.entrypoints=websecure"
- "traefik.http.routers.xiteng-chat-api.tls=true"
- "traefik.http.routers.xiteng-chat-api.tls.certresolver=cfresolver"
- "traefik.http.routers.xiteng-chat-api.service=xiteng-chat"
- "traefik.http.routers.xiteng-chat-api.middlewares=xiteng-chat-scheme,xiteng-chat-auth"
- "traefik.http.routers.xiteng-chat-api.priority=320"
- "traefik.http.routers.xiteng-chat-public-api.rule=Host(`xiteng.site`) && Path(`/chat/api/public-config`)"
- "traefik.http.routers.xiteng-chat-public-api.entrypoints=websecure"
- "traefik.http.routers.xiteng-chat-public-api.tls=true"
- "traefik.http.routers.xiteng-chat-public-api.tls.certresolver=cfresolver"
- "traefik.http.routers.xiteng-chat-public-api.service=xiteng-chat"
- "traefik.http.routers.xiteng-chat-public-api.middlewares=xiteng-chat-scheme"
- "traefik.http.routers.xiteng-chat-public-api.priority=330"
- "traefik.http.routers.xiteng-chat-http.rule=Host(`xiteng.site`) && (Path(`/chat`) || PathPrefix(`/chat/`))"
- "traefik.http.routers.xiteng-chat-http.entrypoints=web"
- "traefik.http.routers.xiteng-chat-http.service=xiteng-chat"
- "traefik.http.routers.xiteng-chat-http.middlewares=xiteng-chat-scheme,xiteng-chat-auth"
- "traefik.http.routers.xiteng-chat-http.middlewares=xiteng-chat-scheme"
- "traefik.http.routers.xiteng-chat-http.priority=300"
- "traefik.http.routers.xiteng-chat-api-http.rule=Host(`xiteng.site`) && PathPrefix(`/chat/api/`)"
- "traefik.http.routers.xiteng-chat-api-http.entrypoints=web"
- "traefik.http.routers.xiteng-chat-api-http.service=xiteng-chat"
- "traefik.http.routers.xiteng-chat-api-http.middlewares=xiteng-chat-scheme,xiteng-chat-auth"
- "traefik.http.routers.xiteng-chat-api-http.priority=320"
- "traefik.http.routers.xiteng-chat-public-api-http.rule=Host(`xiteng.site`) && Path(`/chat/api/public-config`)"
- "traefik.http.routers.xiteng-chat-public-api-http.entrypoints=web"
- "traefik.http.routers.xiteng-chat-public-api-http.service=xiteng-chat"
- "traefik.http.routers.xiteng-chat-public-api-http.middlewares=xiteng-chat-scheme"
- "traefik.http.routers.xiteng-chat-public-api-http.priority=330"
- "xiteng.site.cache.chat.enabled=true"
- "xiteng.site.cache.chat.routers=xiteng-chat,xiteng-chat-http"
- "xiteng.site.cache.chat.paths=/chat/assets/,/chat/icons/"
@@ -132,12 +159,12 @@ services:
- "xiteng.site.cache.chat.stale-while-revalidate=86400"
- "xiteng.site.component.chat.enabled=true"
- "xiteng.site.component.chat.name=Xiteng Chat"
- "xiteng.site.component.chat.description=基于 Vanilla TypeScript、Bun 与个人 Key Vault 的轻量 AI 对话界面。"
- "xiteng.site.component.chat.description=本地优先的 AI 对话界面;无需登录即可使用浏览器 Provider,登录后启用个人同步与 Key Vault。"
- "xiteng.site.component.chat.section=services"
- "xiteng.site.component.chat.category=AI"
- "xiteng.site.component.chat.url=https://xiteng.site/chat/"
- "xiteng.site.component.chat.access=sso"
- "xiteng.site.component.chat.access-label=需要登录"
- "xiteng.site.component.chat.access=public"
- "xiteng.site.component.chat.access-label=可以登录"
- "xiteng.site.component.chat.icon=AI"
- "xiteng.site.component.chat.icon-url=https://xiteng.site/icons/services/chat.svg"
- "xiteng.site.component.chat.accent=blue"