@agent-native/dispatch 0.25.0 → 0.26.0

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.
Files changed (29) hide show
  1. package/dist/actions/provider-api-register.d.ts +11 -11
  2. package/dist/components/create-app-popover.d.ts +7 -2
  3. package/dist/components/create-app-popover.d.ts.map +1 -1
  4. package/dist/components/create-app-popover.js +4 -3
  5. package/dist/components/create-app-popover.js.map +1 -1
  6. package/dist/components/index.d.ts +1 -0
  7. package/dist/components/index.d.ts.map +1 -1
  8. package/dist/components/index.js +1 -0
  9. package/dist/components/index.js.map +1 -1
  10. package/dist/components/layout/Layout.d.ts.map +1 -1
  11. package/dist/components/layout/Layout.js +42 -2
  12. package/dist/components/layout/Layout.js.map +1 -1
  13. package/dist/components/simple-agents-panel.d.ts +4 -1
  14. package/dist/components/simple-agents-panel.d.ts.map +1 -1
  15. package/dist/components/simple-agents-panel.js +46 -13
  16. package/dist/components/simple-agents-panel.js.map +1 -1
  17. package/dist/components/workspace-app-host.d.ts +3 -1
  18. package/dist/components/workspace-app-host.d.ts.map +1 -1
  19. package/dist/components/workspace-app-host.js +11 -2
  20. package/dist/components/workspace-app-host.js.map +1 -1
  21. package/package.json +3 -3
  22. package/src/components/create-app-popover.spec.tsx +9 -1
  23. package/src/components/create-app-popover.tsx +9 -1
  24. package/src/components/index.ts +1 -0
  25. package/src/components/layout/Layout.app-chat.spec.ts +22 -0
  26. package/src/components/layout/Layout.tsx +72 -3
  27. package/src/components/simple-agents-panel.spec.tsx +81 -1
  28. package/src/components/simple-agents-panel.tsx +156 -71
  29. package/src/components/workspace-app-host.tsx +30 -1
@@ -1,3 +1,4 @@
1
+ import { AgentSidebar } from "@agent-native/core/client/agent-chat";
1
2
  import {
2
3
  ChatFirstAppPane,
3
4
  defaultChatFirstCopy,
@@ -56,12 +57,15 @@ interface WorkspaceAppFrameProps {
56
57
  app: WorkspaceAppFrameApp;
57
58
  /** Chat-first app tabs use their own route while standalone hosts use app metadata. */
58
59
  embedPath?: string;
60
+ /** Chat-first app surfaces own the parent chat rail around the iframe. */
61
+ chatSidebar?: boolean;
59
62
  copy?: ChatFirstCopy;
60
63
  }
61
64
 
62
65
  export function WorkspaceAppFrame({
63
66
  app,
64
67
  embedPath,
68
+ chatSidebar = false,
65
69
  copy = defaultChatFirstCopy,
66
70
  }: WorkspaceAppFrameProps) {
67
71
  const [embedUrl, setEmbedUrl] = useState<string | null>(null);
@@ -154,7 +158,7 @@ export function WorkspaceAppFrame({
154
158
  window.removeEventListener("message", handleEmbedSessionExpired);
155
159
  }, [embedUrl]);
156
160
 
157
- return (
161
+ const appPane = (
158
162
  <ChatFirstAppPane
159
163
  app={app}
160
164
  status={
@@ -186,6 +190,31 @@ export function WorkspaceAppFrame({
186
190
  copy={copy}
187
191
  />
188
192
  );
193
+
194
+ if (!chatSidebar) return appPane;
195
+
196
+ return (
197
+ <AgentSidebar
198
+ position="left"
199
+ defaultOpen
200
+ openStorageKey="dispatch-app-chat"
201
+ storageKey={`dispatch-app-chat:${app.id}`}
202
+ scope={{
203
+ type: "workspace-app",
204
+ id: app.id,
205
+ label: app.name,
206
+ contextKey: `workspace-app:${app.id}`,
207
+ }}
208
+ agentChatSurface="app"
209
+ showTabBar
210
+ suppressInlineOpenApp
211
+ dynamicSuggestions={false}
212
+ suggestions={[]}
213
+ emptyStateText={`Ask about ${app.name}`}
214
+ >
215
+ {appPane}
216
+ </AgentSidebar>
217
+ );
189
218
  }
190
219
 
191
220
  export function WorkspaceAppHost({ appId }: { appId?: string }) {