Reduce resume OOM risk and fix update-config skill init (#304)
* Reduce resume transcript memory pressure * Fix update-config bundled skill schema generation --------- Co-authored-by: pr0ln <pr0ln@pr0lnui-Macmini.local>
This commit is contained in:
23
src/skills/bundled/updateConfig.test.ts
Normal file
23
src/skills/bundled/updateConfig.test.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { afterEach, expect, test } from 'bun:test'
|
||||
|
||||
import { clearBundledSkills, getBundledSkills } from '../bundledSkills.js'
|
||||
import { registerUpdateConfigSkill } from './updateConfig.js'
|
||||
|
||||
afterEach(() => {
|
||||
clearBundledSkills()
|
||||
})
|
||||
|
||||
test('update-config skill can generate its prompt without JSON Schema conversion errors', async () => {
|
||||
registerUpdateConfigSkill()
|
||||
|
||||
const skill = getBundledSkills().find(command => command.name === 'update-config')
|
||||
expect(skill).toBeDefined()
|
||||
expect(skill?.type).toBe('prompt')
|
||||
|
||||
const blocks = await skill!.getPromptForCommand('', {} as never)
|
||||
expect(blocks.length).toBeGreaterThan(0)
|
||||
expect(blocks[0]).toMatchObject({ type: 'text' })
|
||||
expect((blocks[0] as { text: string }).text).toContain(
|
||||
'## Full Settings JSON Schema',
|
||||
)
|
||||
})
|
||||
Reference in New Issue
Block a user