Commit Graph

611 Commits

Author SHA1 Message Date
ZhenYi
670bcc8c06 feat(deploy): configure ingress with gingress, cert-manager TLS, and SSH LB
- Set primary domain gitdata.ai and static.gitdata.ai with cert-manager TLS
- Add LoadBalancer service for gitserver SSH (port 2222)
- Exclude .server.yaml from Helm packaging
2026-05-10 22:29:32 +08:00
ZhenYi
003f0477f4 feat(core): initialize project with access control and AI integration 2026-05-10 22:15:52 +08:00
ZhenYi
b8c1dc5958 feat(core): initialize project with access control and AI integration 2026-05-10 22:02:38 +08:00
ZhenYi
4e2a39a5c0 fix(workspace): resolve all cargo check warnings across workspace
Remove unused imports and add #[allow(dead_code)] annotations to
intentionally retained fields/methods. Also add deploy/.server.yaml
to .gitignore to prevent accidental credential exposure.
2026-05-10 21:56:08 +08:00
ZhenYi
2a7c8f0ff2 feat(core): initialize project with access control and AI integration 2026-05-10 21:06:56 +08:00
ZhenYi
ba2490dab4 feat(core): initialize project with access control and AI integration 2026-05-10 21:01:21 +08:00
ZhenYi
14f6e1e500 feat(core): initialize project with access control and AI integration
- Add gitignore and prettier configuration files for project scaffolding
- Implement room access control service with project member verification
- Create user access key management with CRUD operations and activity logging
- Add accordion UI component for frontend expandable sections
- Implement room AI configuration with list, upsert, and delete operations
- Add AI event types for agent join/leave/status change tracking
- Create streaming AI processing services for mode and react patterns
- Build room AI service with model detection and idempotency handling
- Integrate chat service orchestration for AI message processing
- Add typing indicators and stream cancellation for AI interactions
- Implement mention parsing and context extraction for AI agents
2026-05-03 06:04:31 +08:00
ZhenYi
4cc14687e0 feat(ai): add comprehensive AI streaming and non-streaming processing services
Some checks failed
CI / Rust Lint & Check (push) Has been cancelled
CI / Rust Tests (push) Has been cancelled
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
2026-05-01 01:14:00 +08:00
ZhenYi
fdca1fbf86 feat(ai): add comprehensive AI streaming and non-streaming processing services
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-05-01 00:54:24 +08:00
ZhenYi
96b92fe487 feat(workspace): initialize Rust workspace with core services and dependencies
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-05-01 00:40:29 +08:00
ZhenYi
59f9b66360 feat(workspace): initialize Rust workspace with core services and dependencies
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-05-01 00:15:55 +08:00
ZhenYi
c48f7319ca fix(chat): handle multi-byte character truncation in tool result preview
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-04-30 23:37:13 +08:00
ZhenYi
5c2369ff47 fix(billing): correct monthly usage calculation query
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-04-30 19:39:26 +08:00
ZhenYi
3e540a5302 chore: update Cargo.lock for agent and room dependency changes
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-04-30 19:17:07 +08:00
ZhenYi
c7cee8c344 misc: polish git hooks, billing services, fctool, and API/WebSocket
- git: clean up hook pool worker, commit sync, HTTP rate limiting
- billing: tighten workspace/project/agent billing logic
- fctool: add project boards and issues management tools
- api/ws: minor room WebSocket protocol adjustments
- frontend: add RoomSettingsPanel component
2026-04-30 19:16:57 +08:00
ZhenYi
08045eef63 refactor(agent): enhance chat service with state management and billing
Add persistent chat session state (ChatState, sequence tracking, tool
calls). Introduce basic billing record in agent crate. Refine chat
service to route messages through state machine with tool support.
2026-04-30 19:16:44 +08:00
ZhenYi
abcfc5b3bb refactor(room): simplify room core modules and connection handling
Extract connection pool management and helper utilities.
Remove redundant metrics indirection, expose counters directly.
Trim room.rs boilerplate and move AI queue logic to room_ai_queue.
2026-04-30 19:16:33 +08:00
ZhenYi
5b81e7d774 refactor(room): refactor AI service modules for cleaner separation
Simplify ai_streaming by delegating to ai_mode_streaming.
Extract sequence coordination into dedicated module.
Add worker pool management for concurrent AI task handling.
Refine ai_react_streaming for better delta chunk handling.
2026-04-30 19:16:23 +08:00
ZhenYi
4ba47370be feat(room): add mode-dispatched AI service orchestration
Add RoomAiService as the central dispatcher that selects execution
path based on mode (react/chat/cot/reflexion/rewoo) and streams
vs nonstreaming preference. Replace monolithic ai_streaming with
mode-aware dispatch and dedicated streaming implementation.
2026-04-30 19:16:11 +08:00
ZhenYi
27b9d3e4bd feat(agent): add CoT, Reflexion, and ReWOO reasoning modes
Implement three alternative reasoning strategies:
- Chain-of-Thought (cot): explicit step-by-step reasoning
- Reflexion: self-critique with revise cycle
- ReWOO: reasoning with external observation tokens
2026-04-30 19:15:55 +08:00
ZhenYi
e9d5407c66 feat(room): add AI streaming and message hooks for frontend
Add use-ai-streaming hook for SSE-based AI response streaming,
use-room-messages for real-time message updates, and wire up
room context + ws protocol changes.
2026-04-30 19:15:42 +08:00
ZhenYi
009ccee72b fix(embed): add debug tracing to all embed methods
Added tracing::debug/info calls to embed_issue, embed_repo,
embed_issues, embed_skill to track embedding API calls and upsert completion.
2026-04-29 15:35:25 +08:00
ZhenYi
6a60d02263 fix(qdrant): reject empty vectors in upsert_points
Prevent Qdrant from rejecting entire batches when any point
has an empty vector. Log error with count before failing.
2026-04-29 15:35:22 +08:00
ZhenYi
395832118e fix(embed): add comprehensive diagnostic tracing for Qdrant
- client.rs: detect document mismatch in embed_batch, warn on empty vectors
- qdrant.rs: reject empty vectors with error logging
- service.rs: add debug/info tracing to embed_issue, embed_repo, embed_issues, embed_skill
2026-04-29 15:35:18 +08:00
ZhenYi
867f216a1f feat(theme): add preset color schemes and theme token system
Add 9 preset themes (Midnight, Forest, Sunset, Rose, Lavender,
Arctic, Nord, Dracula, Clean Light) with full palette definitions.

Implement theme token encoding/decoding algorithm:
- Token format: "T1:" + base64url(minified JSON)
- Share any theme via copyable token string
- Import themes by pasting tokens
- Only 16 core color fields encoded (badge classes derived)
2026-04-29 09:50:13 +08:00
ZhenYi
907b5ee3bf fix(room): fix file upload missing /api prefix and credentials
Upload URL was missing /api prefix causing 404, and missing
credentials: 'include' for cookie-based authentication.
2026-04-29 09:40:58 +08:00
ZhenYi
bba35f1b2c fix(room): increase streaming timeout from 60s to 120s
Some checks failed
CI / Rust Lint & Check (push) Has been cancelled
CI / Rust Tests (push) Has been cancelled
CI / Frontend Lint & Type Check (push) Has been cancelled
CI / Frontend Build (push) Has been cancelled
Give more buffer for heartbeat chunks to arrive during long tool
execution, reducing false "Stream timed out" errors.
2026-04-29 09:03:33 +08:00
ZhenYi
03f97c9221 fix(agent): spawn tool execution in separate task for heartbeat
Move tool execution to a spawned task so synchronous git2 operations
don't block the tokio worker thread, allowing heartbeat chunks to be
sent every 10s during long tool execution.

Also add analysis-first reasoning prompt to system messages.
2026-04-29 09:03:29 +08:00
ZhenYi
30822bbd7d fix(skill): support bare repo scanning via git tree traversal
Add scan_repo_tree_for_skills and scan_skills_from_tree functions that
traverse git objects directly instead of filesystem, enabling skill
discovery in bare repositories created via git2::Repository::init_bare.
2026-04-29 09:03:22 +08:00
ZhenYi
b673c31485 feat(fctool): register new git tools in mod.rs
Register repo_analysis, kb, and repo_util tool modules in the
git_tools register_all function.
2026-04-29 09:03:13 +08:00
ZhenYi
a5704c9730 feat(fctool): add repo utility tools for AI
Add repo_search, repo_readme, repo_commit_log, repo_contributors,
and repo_diff_summary function call tools for AI to search code,
read README, query commit history, list contributors, and diff revisions.
2026-04-29 09:03:03 +08:00
ZhenYi
4ef0d5b570 feat(fctool): add knowledge base tools for AI
Add repo_doc_index, repo_doc_read, and repo_doc_search function call
tools for AI to index, read, and search through documentation repos.
2026-04-29 09:02:56 +08:00
ZhenYi
5f12b07120 feat(fctool): add repo analysis tools for AI
Add repo_overview, repo_file_tree, repo_languages, and repo_dependencies
function call tools for AI to quickly analyze repository structure,
language breakdown, and dependency manifests.
2026-04-29 09:02:51 +08:00
ZhenYi
c2b4553537 feat(client): generate API client SDK with auto-generated exports
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
2026-04-29 00:06:30 +08:00
ZhenYi
7ce113a765 feat(agent): paginated model catalog with pricing + redesigned Add AI panel
Backend:
- New GET /api/agents/models/catalog endpoint with page/per_page/search
  params, excludes deprecated models, returns pricing data via
  model→version→pricing join
- ModelWithPricingResponse includes input_price, output_price, currency
- ModelListResponse with pagination metadata (total, page, per_page)
- Batch-fetches default versions + latest pricing to avoid N+1

Frontend:
- RoomSettingsPanel: replace Dialog with inline two-step panel
  - Step 1: paginated model browser with search, shows context length,
    max output tokens, pricing per 1K tokens, capability/modality badges
  - Step 2: selected model info card + AI configuration form
- Removed Dialog import and related unused dependencies
2026-04-28 23:58:46 +08:00
ZhenYi
bc1bdd8491 fix(room): never expose AI model UID to frontend
Backend:
- room_ai_list: batch-fetch models, skip entries where model_name
  cannot be resolved (instead of falling back to "AI {uid}")
- room_ai_upsert: return None for model_name when lookup fails
  (instead of "AI {uid}")

Frontend:
- room-context: discard configs with missing modelName after retries
- DiscordMemberList: filter out configs without modelName
- MessageInput: filter out configs without modelName
- RoomSettingsPanel: prefer model_name from API, fallback to
  availableModels lookup, never render raw UID
- RoomAiTasksPanel: fix broken id/name mapping (was cfg.id/cfg.name
  which don't exist), filter out configs without model_name
2026-04-28 23:21:45 +08:00
ZhenYi
5351df773b fix(api): register skill routes inside project scope to fix 404
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
In actix-web, separate web::scope() trees don't merge. The /projects
scope was intercepting /api/projects/{name}/skills before the separate
skill scope could match, causing 404 on all skill endpoints.

Move skill routes into init_project_routes as /{project_name}/skills/*
and remove the standalone configure(skill::init_skill_routes) call.
2026-04-28 22:58:57 +08:00
ZhenYi
108dd714d3 fix(room): include @user mentions in AI prompt context
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
- Extend extract_mention_context to handle user mentions
- Both @[repo:xxx] and @[user:xxx] are now included in AI context
2026-04-28 22:25:25 +08:00
ZhenYi
76e3d19cf5 fix(room): require @ai mention to trigger AI response
- process_message_ai now returns early if no @ai mention is found
- Verify mentioned AI exists in the room before responding
2026-04-28 22:21:12 +08:00
ZhenYi
55d33862f6 fix(room): support multiple AIs per room in should_ai_respond
- Add get_room_ai_configs() to fetch all AI configs for a room
- Check all AI model IDs against @ai mentions
2026-04-28 22:16:04 +08:00
ZhenYi
46a0bdc21e fix(room): should_ai_respond only triggers on @ai mention 2026-04-28 22:14:10 +08:00
ZhenYi
c2c079c74d fix(room): invert use_exact logic so it controls all-message mode
Previously: use_exact=false → respond to all messages (wrong default)
Now: use_exact=true → respond to all messages; use_exact=false → only @ai
2026-04-28 22:10:21 +08:00
ZhenYi
db0a2eca16 feat(ssh): add complete SSH server implementation for Git operations
- Implement SSHandle struct with comprehensive Git service handling capabilities
- Add support for multiple authentication methods including password, public key and certificate
- Integrate Git command parsing and execution with proper channel management
- Implement branch protection rules enforcement during Git operations
- Add robust error handling and logging for SSH connections and Git processes
- Create secure Git command execution with environment isolation
- Implement proper resource cleanup for channels and subprocesses
- Add support for receive-pack, upload-pack and upload-archive services
- Integrate with existing authz and database services for permission checks
- Implement proper data forwarding between SSH channels and Git processes

fix(config): improve environment loading with error reporting

- Replace silent dotenv loading failures with informative error messages
- Handle global config race conditions safely during application startup
- Improve config loading reliability and debugging capabilities

fix(link-unfurl): handle server-side rendering compatibility

- Add undefined window object check for SSR environments
- Prevent client-side only code from breaking server-side rendering

refactor(agent): improve tool registry error handling

- Replace panics with graceful error logging for duplicate tool registrations
- Add proper error type definitions for tool registry operations
- Implement safe merging of registries with duplicate detection

fix(room-context): enhance WebSocket connection reliability

- Add proper error handling for room subscription operations
- Improve connection management with better error suppression
- Add console warnings for debugging connection issues

feat(ws-client): add comprehensive WebSocket client implementation

- Create RoomWsClient class with complete WebSocket communication layer
- Implement request-response pattern with timeout handling
- Add support for various room-related events and actions
- Include proper connection status tracking and management
- Implement callback system for different event types
- Add automatic reconnection and error recovery mechanisms
2026-04-28 21:29:34 +08:00
ZhenYi
b3fb027848 fix(git): deduplicate skills by repo_id+blob_hash in hook sync
- Apply same deduplication logic as service scanner
- Keep latest version by commit_sha when duplicates found
- Fix type error: Ok("skill.md") → Some("skill.md".to_string())
2026-04-28 21:28:19 +08:00
ZhenYi
2db7934596 fix(skill): deduplicate skills by repo_id+blob_hash
- Change deduplication key from slug to {repo_id}+{blob_hash}
- Keep latest version by commit_sha when duplicates found
- Use git2 to open repos and get correct workdir and commit_sha
- Fix case-insensitive SKILL.md detection in scanner
2026-04-28 21:27:38 +08:00
ZhenYi
18917b6de1 feat(room): 修改 AI use_exact 默认值为 true
Some checks are pending
CI / Rust Lint & Check (push) Waiting to run
CI / Rust Tests (push) Waiting to run
CI / Frontend Lint & Type Check (push) Waiting to run
CI / Frontend Build (push) Blocked by required conditions
- room/src/ai.rs: use_exact 默认值从 false 改为 true
- 新增 migration: m20260428_000002_default_use_exact_true
2026-04-28 20:00:12 +08:00
ZhenYi
aab9f0dbf1 feat(frontend): 替换全屏loading动画为SVG逐帧绘制动画
- 新增 loading-animation.tsx 组件,从 public/load.html 转换
- 动画特性: SVG路径逐条绘制 + 渐变填充,最少展示1.5秒
- 替换 homepage/layout.tsx, workspace/redirect.tsx, protected-route.tsx 中的全屏加载
- 修复 sidebar-user.tsx 中 Invitations 按钮在缩回状态下的居中问题
2026-04-28 19:59:31 +08:00
ZhenYi
4571d4d042 fix(service): 修复扣费结果类型处理
- service/agent/billing.rs: 适配新的 BillingResult 枚举类型
- 将 InsufficientBalance 错误转换为 AppError::BadRequest
2026-04-28 19:59:17 +08:00
ZhenYi
c6bb72682b fix(agent): 修复扣费链路并实现级联扣费策略
- billing.rs: 修复参数传递 (model_id -> version_id)
- billing.rs: 新增 BillingResult 枚举支持 InsufficientBalance 错误
- billing.rs: 实现级联扣费 (优先 project 余额,不足时 fallback 到 workspace)
- billing.rs: 余额不足时创建系统消息并持久化
- chat/service.rs: 捕获 InsufficientBalance 错误并调用 create_system_message
- client/mod.rs: 超时时间从 60s 改为 120s
2026-04-28 19:59:06 +08:00
ZhenYi
13523762aa fix(fctool): 修复 git tools 中的类型不匹配问题
- blob.rs: 修复 resolve_oid 返回 commit OID 而非 blob OID 的问题
- tree.rs: 修复 git_tree_ls_exec 直接传递 commit OID 给 tree_list 的问题
- 所有修改使类型合约与 git domain API 匹配
2026-04-28 19:58:52 +08:00