- Admin users can choose to install skills to public (built-in) or custom category via UI radio selector in InstallSkillDialog - Backend: SkillStorage.ainstall_skill_from_archive accepts target_category param; non-admin 403 on public install - Backend: AgentStore/SkillStore add count_owned(user_id); UserRepository/LocalAuthProvider add list_users() - Backend: GET /api/v1/auth/users endpoint (admin-only) returns all users with skill_count and agent_count - Frontend: admin-only "用户管理" nav item in sidebar; /page/workspace/admin/users route with user table - i18n: added sidebar.users and adminUsers section in zh-CN/en-US Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
12 lines
240 B
TypeScript
12 lines
240 B
TypeScript
import { useQuery } from "@tanstack/react-query";
|
|
|
|
import { listAllUsers } from "./api";
|
|
|
|
export function useAllUsers(enabled: boolean) {
|
|
return useQuery({
|
|
queryKey: ["admin", "users"],
|
|
queryFn: listAllUsers,
|
|
enabled,
|
|
});
|
|
}
|