@multiplayer-app/ai-agent-react 0.1.0-beta.100 → 0.1.0-beta.102

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ComposerInputRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatWindow/Composer/ComposerInputRow/ComposerInputRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAiBpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AACD,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAA;AAEhD,eAAO,MAAM,gBAAgB,+FAwY5B,CAAA;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"ComposerInputRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/ChatWindow/Composer/ComposerInputRow/ComposerInputRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAQ9B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAiBpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,YAAY,CAAA;IACpB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AACD,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAA;AAEhD,eAAO,MAAM,gBAAgB,+FA2Y5B,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -2,13 +2,19 @@ import { ChatMetadataInput } from '../config/types';
2
2
 
3
3
  export type ChatMetadataProvider = (input: ChatMetadataInput) => Record<string, unknown> | undefined;
4
4
  /**
5
- * Register metadata to persist on a chat at creation time (`AgentChat.metadata`).
5
+ * Register metadata for a chat. The provider is evaluated on every outgoing
6
+ * message: at chat creation the result is persisted into the new chat's
7
+ * `metadata` (and a returned `title` overrides the auto-generated title); on
8
+ * every message — including the first — it is also merged into the message
9
+ * payload's `metadata`, so values that can change mid-chat (e.g. an Office
10
+ * `docSessionId` after a reconnect) stay current for the backend to read. The
11
+ * backend re-persists it only at creation, so later messages never clobber the
12
+ * stored chat metadata or title.
6
13
  *
7
- * Unlike `usePageContext` (which attaches per-message context), the provider
8
- * here runs ONCE when a new chat is created. Use it for stable, chat-scoped
9
- * facts — e.g. the active document name/path in an Office add-in, or the
10
- * current record/tenant id. The returned object is merged (shallow) into the
11
- * new chat's `metadata`; returning `title` overrides the auto-generated title.
14
+ * Use it for chat-scoped or slowly-changing facts — the active document
15
+ * name/path/session in an Office add-in, or the current record/tenant id.
16
+ * (`usePageContext` remains the channel for per-message context that the user
17
+ * can see and dismiss.)
12
18
  *
13
19
  * Example:
14
20
  *
@@ -1 +1 @@
1
- {"version":3,"file":"useChatMetadata.d.ts","sourceRoot":"","sources":["../../src/hooks/useChatMetadata.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;AAEpG;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,oBAAoB,EAAE,OAAM,OAAO,EAAO,SAanF,CAAA"}
1
+ {"version":3,"file":"useChatMetadata.d.ts","sourceRoot":"","sources":["../../src/hooks/useChatMetadata.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,iBAAiB,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;AAEpG;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,eAAe,GAAI,UAAU,oBAAoB,EAAE,OAAM,OAAO,EAAO,SAanF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"useChatSendController.d.ts","sourceRoot":"","sources":["../../src/hooks/useChatSendController.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAA8C,MAAM,uBAAuB,CAAA;AAEhG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAI7E,MAAM,WAAW,4BAA4B;IAC3C,mBAAmB,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,CAAA;IAC3E,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAA;IACxD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,eAAO,MAAM,qBAAqB,GAAI,qEAKnC,4BAA4B;;;;;;4BAiZX,MAAM;;4BAyCX,MAAM;CAmBpB,CAAA"}
1
+ {"version":3,"file":"useChatSendController.d.ts","sourceRoot":"","sources":["../../src/hooks/useChatSendController.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAA8C,MAAM,uBAAuB,CAAA;AAEhG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAI7E,MAAM,WAAW,4BAA4B;IAC3C,mBAAmB,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC,CAAA;IAC3E,eAAe,EAAE,KAAK,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAA;IACxD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAC1B;AAED,eAAO,MAAM,qBAAqB,GAAI,qEAKnC,4BAA4B;;;;;;4BAqZX,MAAM;;4BAyCX,MAAM;CAmBpB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplayer-app/ai-agent-react",
3
- "version": "0.1.0-beta.100",
3
+ "version": "0.1.0-beta.102",
4
4
  "description": "Composable React/Vite frontend primitives for Multiplayer AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/ai-agent-react.cjs.js",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@floating-ui/react": "^0.27.16",
48
- "@multiplayer-app/ai-agent-types": "0.1.0-beta.100",
48
+ "@multiplayer-app/ai-agent-types": "0.1.0-beta.102",
49
49
  "@tanstack/react-query": "5.64.0",
50
50
  "@tanstack/react-virtual": "^3.13.23",
51
51
  "highlight.js": "^11.11.1",