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:
pr0ln
2026-04-04 11:15:01 +09:00
committed by GitHub
parent fb221baa21
commit 694c242865
4 changed files with 294 additions and 13 deletions

View 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',
)
})