@harnessio/ai-chat-core 0.0.20 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/QuickActionRegistry.d.ts +48 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/index.js +678 -449
- package/dist/index.js.map +1 -1
- package/dist/react/hooks/index.d.ts +3 -0
- package/dist/react/hooks/useQuickAction.d.ts +26 -0
- package/dist/react/hooks/useQuickActionScope.d.ts +21 -0
- package/dist/react/hooks/useQuickActions.d.ts +25 -0
- package/dist/runtime/AssistantRuntime/AssistantRuntime.d.ts +2 -0
- package/dist/runtime/ThreadRuntime/ThreadRuntime.d.ts +14 -1
- package/dist/runtime/ThreadRuntime/ThreadRuntimeCore.d.ts +13 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/quick-action.d.ts +21 -0
- package/package.json +2 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { QuickAction, QuickActionConfig, QuickActionFilter, QuickActionScopeMode } from '../types/quick-action';
|
|
2
|
+
export declare class QuickActionRegistry {
|
|
3
|
+
private scopes;
|
|
4
|
+
private scopeStack;
|
|
5
|
+
constructor();
|
|
6
|
+
/**
|
|
7
|
+
* Activate a scope with the specified mode.
|
|
8
|
+
* This pushes the scope onto the stack, making it active.
|
|
9
|
+
*/
|
|
10
|
+
activateScope(scope: string, mode?: QuickActionScopeMode): void;
|
|
11
|
+
/**
|
|
12
|
+
* Deactivate a scope, removing it from the stack.
|
|
13
|
+
* This restores the previous scope as active.
|
|
14
|
+
*/
|
|
15
|
+
deactivateScope(scope: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Get the currently active scope (top of stack).
|
|
18
|
+
*/
|
|
19
|
+
getActiveScope(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Get the full scope stack.
|
|
22
|
+
*/
|
|
23
|
+
getScopeStack(): string[];
|
|
24
|
+
/**
|
|
25
|
+
* Register a quick action in the specified scope.
|
|
26
|
+
*/
|
|
27
|
+
register(config: QuickActionConfig, scope?: string): void;
|
|
28
|
+
/**
|
|
29
|
+
* Unregister a quick action from the specified scope.
|
|
30
|
+
*/
|
|
31
|
+
unregister(id: string, scope?: string): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Clear all actions in the specified scope.
|
|
34
|
+
*/
|
|
35
|
+
clearScope(scope: string): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get all visible quick actions based on the active scope and its mode.
|
|
38
|
+
*/
|
|
39
|
+
getVisible(filter?: QuickActionFilter): Promise<QuickAction[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Get a single quick action by ID from the specified scope.
|
|
42
|
+
*/
|
|
43
|
+
get(id: string, scope?: string): QuickAction | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Check if a quick action exists in the specified scope.
|
|
46
|
+
*/
|
|
47
|
+
has(id: string, scope?: string): boolean;
|
|
48
|
+
}
|
package/dist/core/index.d.ts
CHANGED