mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 01:29:51 +08:00
Ship folder-based workspaces and data migration, daily practice, redesigned provider and model settings, and streaming conversation improvements. Synchronize README translations and document the archive/permanent-delete upgrade behavior in assets/releases/ver1-6-9.md. Reduce initial JavaScript by deduplicating English resources and loading animation features after hydration. Keep the existing route size budgets. Update regression fixtures and browser audits for scoped URLs and the new settings and learning interfaces.
46 lines
916 B
TypeScript
46 lines
916 B
TypeScript
export const RESOURCE_KINDS = [
|
|
"attachments",
|
|
"books",
|
|
"reading",
|
|
"notebooks",
|
|
"chat_history",
|
|
"my_agents",
|
|
"question_bank",
|
|
"memory",
|
|
"knowledge",
|
|
"persona",
|
|
"agent",
|
|
"partner",
|
|
"partner_group",
|
|
"skills",
|
|
"mcp",
|
|
] as const;
|
|
export type ResourceKind = (typeof RESOURCE_KINDS)[number];
|
|
export type ResourceReuse = Record<ResourceKind, boolean>;
|
|
export const DEFAULT_RESOURCE_REUSE: ResourceReuse = {
|
|
attachments: false,
|
|
books: false,
|
|
reading: false,
|
|
notebooks: false,
|
|
chat_history: false,
|
|
my_agents: false,
|
|
question_bank: false,
|
|
memory: false,
|
|
knowledge: true,
|
|
persona: true,
|
|
agent: true,
|
|
partner: true,
|
|
partner_group: true,
|
|
skills: true,
|
|
mcp: true,
|
|
};
|
|
export function retainedKnowledgeBases(
|
|
names: string[],
|
|
agents: Set<string>,
|
|
reuse: ResourceReuse,
|
|
) {
|
|
return names.filter(
|
|
(name) => reuse[agents.has(name) ? "agent" : "knowledge"],
|
|
);
|
|
}
|