[TASK-tsk_6781b71ba02964dbe9350a24][Account & Model Mgmt Developer] feat: 团队名单按需加载 — 仅注入当前项目相关团队成员 - #248
Open
jsyqrt wants to merge 1 commit into
Open
[TASK-tsk_6781b71ba02964dbe9350a24][Account & Model Mgmt Developer] feat: 团队名单按需加载 — 仅注入当前项目相关团队成员#248jsyqrt wants to merge 1 commit into
jsyqrt wants to merge 1 commit into
Conversation
- 在 TaskProjectContext.project 中添加 teamIds 字段 - task-service 在构建项目上下文时传递 teamIds - context-engine 的 buildIdentitySection 按 projectTeamIds 过滤 otherTeams - 非项目场景(心跳、自由聊天)保持全量 otherTeams - agent_list_colleagues 工具不受影响,始终返回全部成员
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📋 基本信息
🎯 背景与动机 (Why)
当前 system prompt 的
## Other Teams段注入全组织所有团队名单,包含大量与当前项目无关的成员信息。这严重浪费 context window tokens(预估 ~2,500 tokens/次)。本 PR 改为按当前项目过滤:仅注入项目teamIds关联的团队成员。🔧 变更内容 (What)
packages/core/src/agent.ts: TaskProjectContext.project 新增teamIds?: string[]字段packages/org-manager/src/task-service.ts: 构建 TaskProjectContext 时从 project 传递 teamIdspackages/core/src/context-engine.ts:packages/core/test/context-engine-deep.test.ts: 新增 3 个测试用例覆盖过滤逻辑✅ 验证方式 (How to Verify)
✅ 质量自检清单
Spec / 设计文档
测试覆盖
编译验证
👤 评审人