fix(provider.anthropic): Fix Anthropic research tool identifier and add tests + local Claude permissions

This commit is contained in:
2025-09-28 15:51:50 +00:00
parent 0403443634
commit f70353e6ca
9 changed files with 578 additions and 70 deletions

View File

@@ -9,7 +9,8 @@ tap.test('Basic: should create SmartAi instance', async () => {
openaiToken: 'dummy-token-for-testing'
});
expect(testSmartai).toBeInstanceOf(smartai.SmartAi);
expect(testSmartai.openaiProvider).toBeTruthy();
// Provider is only created after calling start()
expect(testSmartai.options.openaiToken).toEqual('dummy-token-for-testing');
});
tap.test('Basic: should instantiate OpenAI provider', async () => {
@@ -64,10 +65,10 @@ tap.test('Basic: should instantiate Ollama provider', async () => {
});
tap.test('Basic: should instantiate xAI provider', async () => {
const xaiProvider = new smartai.XaiProvider({
const xaiProvider = new smartai.XAIProvider({
xaiToken: 'dummy-token'
});
expect(xaiProvider).toBeInstanceOf(smartai.XaiProvider);
expect(xaiProvider).toBeInstanceOf(smartai.XAIProvider);
expect(typeof xaiProvider.chat).toEqual('function');
expect(typeof xaiProvider.research).toEqual('function');
});