import { describe, expect, it } from 'vitest'
import { createNoopToolRunner } from '../src/dimsdk/cli/dimsdk/tool-runner.ts'

describe('createNoopToolRunner', () => {
  it('returns a stable tool error payload for the shared store', async () => {
    const runTool = createNoopToolRunner()

    await expect(
      runTool({
        id: 'tool-1',
        name: 'Read',
        arguments: {},
      }),
    ).resolves.toEqual({
      toolCallId: 'tool-1',
      status: 'error',
      output: [
        'Tool execution is handled by the DimCode agent.',
        'This UI cannot run tool "Read" locally.',
      ].join('\n'),
    })
  })
})
