juneau 0.5.0 → 0.5.2
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/context/AiChatProvider.d.ts +8 -2
- package/dist/context/AiChatProvider.d.ts.map +1 -1
- package/dist/index.cjs +16 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import type { AiBackendAdapter } from '../core/types';
|
|
2
|
+
import type { AiMessage, AiBackendAdapter } from '../core/types';
|
|
3
3
|
type Props = {
|
|
4
4
|
adapter: AiBackendAdapter;
|
|
5
5
|
/** Initial context passed to the adapter. Update it per-page via setContext(). */
|
|
6
6
|
context?: Record<string, unknown>;
|
|
7
7
|
onProposalConfirm?: (proposalId: string, payload: unknown) => void;
|
|
8
8
|
onProposalCancel?: (proposalId: string) => void;
|
|
9
|
+
/** Restored conversation to start with — typically the output of `deserializeMessages`. */
|
|
10
|
+
initialMessages?: AiMessage[];
|
|
11
|
+
/** Max messages sent to the adapter per request. Rendering is never trimmed. */
|
|
12
|
+
historyLimit?: number;
|
|
13
|
+
/** Called when the conversation settles. Use to persist via `serializeForStorage`. */
|
|
14
|
+
onMessagesChange?: (messages: AiMessage[]) => void;
|
|
9
15
|
children: ReactNode;
|
|
10
16
|
};
|
|
11
|
-
export declare function AiChatProvider({ adapter, context: initialContext, onProposalConfirm, onProposalCancel, children, }: Props): import("react").JSX.Element;
|
|
17
|
+
export declare function AiChatProvider({ adapter, context: initialContext, onProposalConfirm, onProposalCancel, initialMessages, historyLimit, onMessagesChange, children, }: Props): import("react").JSX.Element;
|
|
12
18
|
export {};
|
|
13
19
|
//# sourceMappingURL=AiChatProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiChatProvider.d.ts","sourceRoot":"","sources":["../../src/context/AiChatProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"AiChatProvider.d.ts","sourceRoot":"","sources":["../../src/context/AiChatProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGjE,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,gBAAgB,CAAC;IAC1B,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACnE,gBAAgB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,2FAA2F;IAC3F,eAAe,CAAC,EAAE,SAAS,EAAE,CAAC;IAC9B,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IACnD,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,OAAO,EAAE,cAAc,EACvB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,QAAQ,GACT,EAAE,KAAK,+BAsBP"}
|