mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-23 09:07:46 +02:00
test(briefs): cover bridge host context
This commit is contained in:
1 parent
59dd63fde6
commit
71734b3d73
3 files changed
+10
-1
No files matched your search
@@ -26,6 +26,14 @@ vi.mock("@paperclipai/plugin-sdk/ui", () => {
|
||||
navigate: () => {},
|
||||
linkProps: (to: string) => ({ href: to, onClick: () => {} }),
|
||||
}),
|
||||
useHostContext: () => ({
|
||||
companyId: "company-1",
|
||||
companyPrefix: "PAP",
|
||||
projectId: null,
|
||||
entityId: null,
|
||||
entityType: null,
|
||||
userId: "user-1",
|
||||
}),
|
||||
usePluginAction: (key: string) => {
|
||||
if (key === "pin-card") return actionCalls.pin;
|
||||
if (key === "dismiss-card") return actionCalls.dismiss;
|
||||
|
||||
@@ -15,6 +15,7 @@ import type {
|
||||
PluginEventType,
|
||||
PluginToolDeclaration,
|
||||
PluginLauncherDeclaration,
|
||||
PluginLauncherRenderContextSnapshot,
|
||||
Company,
|
||||
Project,
|
||||
Issue,
|
||||
|
||||
@@ -1188,7 +1188,7 @@ export function startWorkerRpcHost(options: WorkerRpcHostOptions): WorkerRpcHost
|
||||
},
|
||||
|
||||
data: {
|
||||
register(key: string, handler: (params: Record<string, unknown>) => Promise<unknown>): void {
|
||||
register(key: string, handler: PluginDataHandler): void {
|
||||
dataHandlers.set(key, handler);
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user