import { describe, expect, it } from 'bun:test'
import { isEnabledInAgentConfig } from './agentConfig.js'

describe('code-tool isEnabledInAgentConfig', () => {
  it('识别 CodeTool 与 *', () => {
    expect(isEnabledInAgentConfig({ tools: ['CodeTool'] })).toBe(true)
    expect(isEnabledInAgentConfig({ tools: ['*'] })).toBe(true)
    expect(isEnabledInAgentConfig({ tools: ['GitTool'] })).toBe(false)
    expect(
      isEnabledInAgentConfig({
        tools: ['*'],
        disallowedTools: ['CodeTool'],
      }),
    ).toBe(false)
  })
})
