@docyrus/ui-pro-ai-assistant 0.6.4 → 0.6.6

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.
@@ -350,6 +350,17 @@ export interface DocyAssistantProps {
350
350
  * Common values: 'web' | 'desktop' | 'chrome' | 'word' | 'excel' | 'powerpoint' | 'outlook'.
351
351
  */
352
352
  hostEnvironment?: string;
353
+ /**
354
+ * Id of the host app currently open in the page. Forwarded to the chat
355
+ * endpoint as `appId` so the agent can scope its behavior/tools to it.
356
+ * The user can dismiss the context chip in the assistant; once dismissed
357
+ * the id stops being sent.
358
+ */
359
+ appId?: string;
360
+ /** Display name for the current host app, shown in the context chip. */
361
+ appName?: string;
362
+ /** Logo URL for the current host app, shown in the context chip. */
363
+ appLogo?: string;
353
364
  /**
354
365
  * Host-provided tools the agent can call and have executed client-side.
355
366
  * Their definitions are forwarded to the chat endpoint as `clientTools`;
@@ -45,6 +45,14 @@ interface AssistantViewCommonProps {
45
45
  * avatars / names / step templates for `call*Agent` tool calls.
46
46
  */
47
47
  subagents?: Array<Record<string, any>>;
48
+ /** Host app currently in context (id + name + logo). */
49
+ appContext?: {
50
+ id: string;
51
+ name?: string;
52
+ logo?: string;
53
+ } | null;
54
+ /** Called when the user dismisses the app context chip. */
55
+ onClearAppContext?: () => void;
48
56
  }
49
57
  export interface InlineModeProps extends AssistantViewCommonProps {
50
58
  mode: 'inline';
@@ -68,5 +68,13 @@ export interface ChatPanelProps {
68
68
  * `call*Agent` tool calls.
69
69
  */
70
70
  subagents?: Array<Record<string, any>>;
71
+ /** Host app currently in context (id + display name + logo). Renders a dismissable chip above the input. */
72
+ appContext?: {
73
+ id: string;
74
+ name?: string;
75
+ logo?: string;
76
+ } | null;
77
+ /** Called when the user dismisses the app context chip. */
78
+ onClearAppContext?: () => void;
71
79
  }
72
- export declare function ChatPanel({ messages, isLoading, input, onInputChange, onSendMessage, onStop, logo, userPhoto, userDisplayName, description, title, welcomeMessage, isLoadingAgent, placeholder, footerText, supportFiles, supportWebSearch, supportDocumentSearch, supportDeepResearch, supportThinking, supportWorkCanvas, supportMultiModels, deploymentId, tenantAiAgentId, enableMicrophone, enableVoice, isRecording, recognition, onMicrophoneClick, onToolAction, openCanvasView, onSendSpreadsheetCommands: _onSendSpreadsheetCommands, onEditPrompt, renderThreadHeader, messagesClassName, compactToolbar, showWelcome, recentSessions, onSessionClick, threadId, initialModelId, initialFeatures, subagents, onManageMemories }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
80
+ export declare function ChatPanel({ messages, isLoading, input, onInputChange, onSendMessage, onStop, logo, userPhoto, userDisplayName, description, title, welcomeMessage, isLoadingAgent, placeholder, footerText, supportFiles, supportWebSearch, supportDocumentSearch, supportDeepResearch, supportThinking, supportWorkCanvas, supportMultiModels, deploymentId, tenantAiAgentId, enableMicrophone, enableVoice, isRecording, recognition, onMicrophoneClick, onToolAction, openCanvasView, onSendSpreadsheetCommands: _onSendSpreadsheetCommands, onEditPrompt, renderThreadHeader, messagesClassName, compactToolbar, showWelcome, recentSessions, onSessionClick, threadId, initialModelId, initialFeatures, subagents, onManageMemories, appContext, onClearAppContext }: ChatPanelProps): import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docyrus/ui-pro-ai-assistant",
3
- "version": "0.6.4",
3
+ "version": "0.6.6",
4
4
  "description": "Docyrus AI Assistant component — full-featured chat UI with canvas, projects, and i18n support.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",