mirror of
https://github.com/hanzoai/extension.git
synced 2026-10-31 21:57:06 +00:00
New @hanzo/salesforce SFDX package: a Lightning Web Component assistant on Account/Opportunity/Case/Lead/Contact record pages, backed by Apex callouts to the api.hanzo.ai/v1 gateway (OpenAI-compatible, same wire format as the browser extension, Office add-in, gworkspace add-on, and Slack app). - HanzoClient: pure request/response core (buildMessages/requestBody/ extractContent/parseModels) + ask/listModels callouts via the Hanzo_API Named Credential — the key never touches Apex. - HanzoContext: SOQL record + related-list context assembly per object, WITH SECURITY_ENFORCED, truncated to a token budget. - HanzoController: @AuraEnabled complete/listModels/writeBack; write-back creates a Task, a ContentNote, or a Chatter FeedItem (as user). - LWC hanzoAssistant: model picker + quick actions (Summarize, Draft email, Next steps, Risks) + prompt + write-back, on record pages. - Named + External Credential for api.hanzo.ai, permission set with principal access, Connected App, Hanzo_Config__mdt default-model config. - Tests: HanzoClientTest + HanzoControllerTest with HttpCalloutMock (asserts URL /v1/chat/completions, bearer, body model+messages, response parse, and each write-back) — >75% coverage; vitest over the truncate helper. - Registered packages/salesforce in pnpm-workspace.yaml.
9 lines
159 B
TypeScript
9 lines
159 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
include: ['tests/**/*.test.mjs'],
|
|
environment: 'node',
|
|
},
|
|
});
|