Commit Graph
67 Commits
Author SHA1 Message Date
gongzhiyongandClaude Opus 4.6 743aadb771 fix: use uuid type for ticket_id to prevent /summary route conflict
{ticket_id:str} was matching /api/tickets/summary before the literal route.
Changing to {ticket_id:uuid} restricts matching to UUID format only.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 16:43:15 +08:00
gongzhiyongandClaude Opus 4.6 9f2a144f65 fix(backend): resolve search concurrency race and add tickets summary endpoint
- Replace module-level _current_model global with contextvars.ContextVar
  to prevent concurrent requests from overwriting each other's search
  strategy (flash vs pro)
- Add GET /api/tickets/summary returning {total, by_status, by_priority}
  aggregated from Gongdan API, registered before parameterized ticket routes

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 16:37:42 +08:00
gongzhiyongandClaude Sonnet 4.6 117a8ddb58 Fix duplicate gem icon during AI streaming response
Skip rendering the empty placeholder assistant message while isLoading
is true — the GeminiTypingIndicator already shows the gem icon with
bouncing dots. Once tokens arrive and content is non-empty, the message
renders normally via GeminiMessage.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 16:35:57 +08:00
gongzhiyongandClaude Sonnet 4.6 60acbac464 Fix 3 P0 issues from code review
FCR-1: Set ignoreBuildErrors to false in next.config.mjs
FCR-2: Default API_URL to production backend so static builds work correctly;
       .env.local overrides to localhost for local dev
FCR-3: Remove createConversation call in handleSend; generate UUID client-side
       and let backend streamChat auto-create the conversation to avoid duplicate writes

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 16:21:33 +08:00
gongzhiyongandClaude Opus 4.6 3869be3ccc feat: add Azure Static Web App deployment for frontend
Create deploy-frontend.yml workflow using Azure/static-web-apps-deploy@v1.
Add output: 'export' to next.config.mjs for static site generation.
Static Web App created in Operation resource group (soc-frontend, Free tier).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:53:54 +08:00
gongzhiyongandClaude Sonnet 4.6 a36f039ff9 Replace mock data with real backend API calls
- Add frontend/lib/api.ts with typed API client for conversations, tickets, and SSE chat streaming
- Replace simulateAIResponse() with real SSE streaming via POST /api/chat/stream
- Replace MOCK_CONVERSATIONS with GET /api/conversations
- Replace MOCK_TICKETS with GET /api/tickets
- Lift activeTools and selectedModel state from GeminiInput to GeminiChat for API integration
- Load conversation messages on demand via GET /api/conversations/{id}
- Backend URL configured via NEXT_PUBLIC_API_URL in .env.local

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:50:05 +08:00
gongzhiyongandClaude Opus 4.6 72f581355c fix: use UUID as ticket id instead of ticketNumber
ticketNumber (e.g. TK-2026-296691) was being used as id, causing
GET /api/tickets/{id} to 404 on upstream Gongdan API which expects UUID.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 15:33:28 +08:00
gongzhiyongandClaude Opus 4.6 6423750f08 fix: add startup.sh with explicit PYTHONPATH for bundled packages
Azure Oryx could not find packages installed to .python_packages/.
Add a startup.sh script that sets PYTHONPATH to include the bundled
package directory before launching gunicorn. Update workflow to set
the Web App startup command to use startup.sh.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:58:07 +08:00
gongzhiyongandClaude Opus 4.6 f2f6efd0ff fix: use Oryx server-side build instead of pre-bundled packages
The previous workflow installed dependencies with pip --target and zipped
them into the deployment package. Azure Oryx runtime could not find
the packages because it looks for antenv/ or __oryx_packages__/, not
.python_packages/. Switch to deploying source-only zip with az webapp
deploy, letting SCM_DO_BUILD_DURING_DEPLOYMENT=true trigger Oryx to
run pip install on the server and create the antenv virtualenv.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:51:25 +08:00
gongzhiyongandClaude Opus 4.6 f4d3e1655a fix: add id-token permission and fix zip package root path
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:42:50 +08:00
gongzhiyongandClaude Opus 4.6 41727c52f4 fix: switch to OIDC auth for Azure deploy, remove duplicate workflow
- Use azure/login@v2 with OIDC (Federated Identity) instead of publish-profile
- Remove auto-generated main_soc-backend.yml (wrong paths)
- Fix deployment package to include backend/ directory properly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:41:34 +08:00
gongzhiyongandClaude Opus 4.6 3759ecd1a6 feat(backend): Phase 3 - Jina search + Redis cache
- Add web_search tool with Jina Search/Reader/Rerank
- Flash mode: top 3, 8s timeout, no Reader/Rerank
- Pro mode: top 10, 20s timeout, concurrent Reader + Rerank top 5
- Add Redis async cache (TTL=300s) for search results
- Register "search" in ALL_TOOLS mapping

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:39:43 +08:00
gongzhiyongandClaude Opus 4.6 cc571afc88 fix: downgrade webapps-deploy to v2 for publish-profile support
v3 was failing with "No credentials found" despite publish-profile being set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:39:28 +08:00
Fasthei 8c92b576be Add or update the Azure App Service build and deployment workflow config 2026-04-08 13:37:13 +08:00
gongzhiyongandClaude Opus 4.6 efb3c53623 feat: add backend service and Azure deployment workflow
- Add complete Python backend (Litestar + LangGraph) with chat, conversations, tickets APIs
- Add GitHub Actions workflow for auto-deploying backend to Azure Web App (soc-backend)
- Add gunicorn to requirements.txt for production serving
- Update CLAUDE.md and EXTERNAL_SERVICES.md with latest config
- Remove obsolete claudehd.md (merged into gpthd.md)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 13:31:00 +08:00
gongzhiyongandClaude Sonnet 4.6 04d8fbb740 refactor: 重组项目结构,前端收拢至 frontend/,新增 backend/ 目录
- 前端文件移入 frontend/ 子目录
- 新建 backend/ 目录(待开发)
- 新增 CLAUDE.md、claudehd.md、EXTERNAL_SERVICES.md

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 18:01:04 +08:00
v0andnull 93017f291a Initialized repository for chat Gemini chat clone
Co-authored-by: null <167957975+Fasthei@users.noreply.github.com>
2026-04-07 09:23:49 +00:00