MCPcopy Create free account
hub / github.com/allocnode/oh-my-sage / patchArrayItems

Function patchArrayItems

src/server/ai/tools-adapter.ts:13–31  ·  view source on GitHub ↗
(schema: unknown)

Source from the content-addressed store, hash-verified

11import {getSkillByName, formatSkillContent, readSkillFile, getSkillCatalog} from '../skills/loader';
12
13// ==================== 规则修改参数 ====================
14
15const positionsSchema = z.record(z.object({
16 x: z.number(),
17 y: z.number(),
18 width: z.number().positive().optional(),
19 height: z.number().positive().optional(),
20}));
21
22const layoutOptionsSchema = z.object({
23 mode: z.enum(['incremental', 'full']).optional().describe('incremental(默认)只摆放没有坐标的卡片;full 全图重排'),
24 pinned: z.array(z.string()).optional().describe('full 模式下保持不动的节点'),
25});
26
27const mergeSchema = z.object({
28 id: z.string().min(1).describe('要局部修改的节点 ID'),
29 props: z.record(z.unknown()).optional().describe('浅合并到 props;值为 null 删除该键'),
30 cfg: z.record(z.unknown()).optional().describe('浅合并到 cfg;值为 null 删除该键'),
31 outputs: z.record(z.array(z.string())).optional().describe('按端口整体替换 outputs'),
32 inputs: z.record(z.unknown()).optional().describe('浅合并到 inputs;值为 null 删除该键'),
33});
34

Callers 1

compatibleParametersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected