refactor(agent): replace OMP with Claude Code kernel

This commit is contained in:
xiaohan.yuan committed 2026-10-20 14:47:56 +08:00
1 parent 0fb2226f8c
commit 9a1f182397
232 files changed
+2561 -25564

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
import assert from 'node:assert/strict'
import { planFromExitInput, questionsFromInput } from '../src/main/agent/claude/claude-tool-input'
const questions = questionsFromInput({
questions: [{
question: 'Which library?',
header: 'Library',
multiSelect: false,
options: [
{ label: 'First', description: 'First option' },
{ label: 'Second', description: 'Second option' }
]
}]
})
assert.equal(questions.length, 1)
assert.equal(questions[0].id, 'question-0')
assert.deepEqual(questions[0].options[0], {
id: 'First',
label: 'First',
question: 'First',
option: 'First',
description: 'First option'
})
const plan = planFromExitInput({}, 'Plan:\n1. Inspect files\n2. Implement change')
assert.deepEqual(plan.steps.map((step) => step.text), ['Plan:', 'Inspect files', 'Implement change'])
assert.equal(plan.steps[0].status, 'pending')
console.log('{"result":"PASS","questions":1,"planSteps":3}')