mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 20:28:23 +00:00
* feat(agent): add nested agents.md support across backend and webui * fix(webui): update agentsmd route paths and unnest folder agentsmd route * fix(agent): flush agents.md autosave on close and address review feedback - Flush pending debounced AGENTS.md autosave on close/unmount so edits made within 750ms of navigating away are no longer silently lost - Serialize autosaves through a promise chain so an older in-flight request can never overwrite newer content on the server - Internationalize the hardcoded "Failed to save" and "Loading AGENTS.md..." strings (en + zh) - Validate that AGENTS.md is only stored on folder/root assets in AssetService, preventing bogus virtual paths for file assets - Cap updateAgentsMd content at 100k chars via Zod validation - Remove unused getAgentsMd/updateAgentsMd response DTO schemas - Drop unused teamId prop from AgentsMdEditor - Add tests: non-folder asset rejection, oversized content 400, and agent-chat workflow assetId passthrough * refactor(db): isolate AGENTS.md content in dedicated 1:1 AssetAgentMd table * style(webui): unify top bar button hover styles and add wand icon to agentsmd button * style(webui): update agentsmd button state colors and remove presence dot * fix(webui): fix close button overflow and stabilize debounced autosave in agentsmd editor * fix(webui): update debounce to 1s and await pending save before closing agentsmd editor * feat(webui): add terminal AGENTS.md breadcrumb on agentsmd editor page * fix(webui): use ScrollArea for markdown editor scrolling
28 lines
855 B
TypeScript
28 lines
855 B
TypeScript
import { z } from 'zod'
|
|
|
|
export const createFolderRequestSchema = z.object({
|
|
name: z.string(),
|
|
parentId: z.string(),
|
|
})
|
|
export type CreateFolderRequest = z.infer<typeof createFolderRequestSchema>
|
|
|
|
export const updateFolderRequestSchema = z.object({
|
|
name: z.string(),
|
|
})
|
|
export type UpdateFolderRequest = z.infer<typeof updateFolderRequestSchema>
|
|
|
|
export const deleteFoldersRequestSchema = z.object({
|
|
ids: z.array(z.string()),
|
|
})
|
|
export type DeleteFoldersRequest = z.infer<typeof deleteFoldersRequestSchema>
|
|
|
|
export const restoreFoldersRequestSchema = z.object({
|
|
ids: z.array(z.string()),
|
|
})
|
|
export type RestoreFoldersRequest = z.infer<typeof restoreFoldersRequestSchema>
|
|
|
|
export const updateAgentsMdRequestSchema = z.object({
|
|
content: z.string().max(100_000),
|
|
})
|
|
export type UpdateAgentsMdRequest = z.infer<typeof updateAgentsMdRequestSchema>
|