feat: 知识库文件夹/模板、技能压缩设置与摘要窗口调优
- 知识库新增文件夹与模板支持(模型/仓储/服务/迁移),前端知识管理组件 - 岗位管理模型与接口完善 - 技能新增压缩设置页与相关存储/工具能力 - 系统设置扩展配置项 - 摘要中间件 keep 窗口改用 token 预算(16000),减少重复压缩 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e6662cf673
commit
5ebbb82d66
54 files changed
+2658
-100
No files matched your search
@@ -106,6 +106,13 @@ export async function resyncPosition(positionId: string): Promise<number> {
|
||||
return data.synced;
|
||||
}
|
||||
|
||||
export async function getMyPosition(): Promise<Position | null> {
|
||||
const res = await apiFetch(`${base()}/me`);
|
||||
if (!res.ok) throw await parseDetail(res, "Failed to load my position");
|
||||
const data = (await res.json()) as { position: Position | null };
|
||||
return data.position ?? null;
|
||||
}
|
||||
|
||||
export async function listPositionUsers(): Promise<PositionUser[]> {
|
||||
const res = await apiFetch(`${base()}/users`);
|
||||
if (!res.ok) throw await parseDetail(res, "Failed to list users");
|
||||
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
addMembers,
|
||||
createPosition,
|
||||
deletePosition,
|
||||
getMyPosition,
|
||||
getTagBindings,
|
||||
listMembers,
|
||||
listPositionUsers,
|
||||
@@ -26,12 +27,18 @@ const positionKeys = {
|
||||
bindings: (id: string) => ["positions", "bindings", id] as const,
|
||||
members: (id: string) => ["positions", "members", id] as const,
|
||||
users: ["positions", "users"] as const,
|
||||
me: ["positions", "me"] as const,
|
||||
};
|
||||
|
||||
export function usePositions() {
|
||||
return useQuery({ queryKey: positionKeys.list, queryFn: listPositions });
|
||||
}
|
||||
|
||||
/** The caller's own effective position (explicit, else default). */
|
||||
export function useMyPosition() {
|
||||
return useQuery({ queryKey: positionKeys.me, queryFn: getMyPosition });
|
||||
}
|
||||
|
||||
export function usePositionUsers() {
|
||||
return useQuery({ queryKey: positionKeys.users, queryFn: listPositionUsers });
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user