@deepagents/react-genai 7.47.1 → 7.49.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.
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1045 -963
- package/dist/index.js.map +1 -1
- package/dist/lib/chat/trajectory/trajectories/compact-messages.d.ts +2 -1
- package/dist/lib/chat/trajectory/trajectories/compact-messages.d.ts.map +1 -1
- package/dist/lib/chat/trajectory/trajectories/message-actions.d.ts.map +1 -1
- package/dist/lib/components/CitationPill.d.ts +1 -6
- package/dist/lib/components/CitationPill.d.ts.map +1 -1
- package/dist/lib/i18n/index.d.ts +3 -0
- package/dist/lib/i18n/index.d.ts.map +1 -0
- package/dist/lib/i18n/messages.d.ts +42 -0
- package/dist/lib/i18n/messages.d.ts.map +1 -0
- package/dist/lib/i18n/provider.d.ts +14 -0
- package/dist/lib/i18n/provider.d.ts.map +1 -0
- package/package.json +5 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
+
import type { SettledStepsStatus } from '../../../i18n/messages.ts';
|
|
2
3
|
import type { ToolCallLabel } from '../../../tools/registry.ts';
|
|
3
4
|
import { type MessageTrajectorySegment } from '../trajectory-segments.ts';
|
|
4
5
|
import { CopyAssistantMessageAction, CopyAssistantMessageJsonAction, MessagesActions, RegenerateAction } from './message-actions.tsx';
|
|
@@ -25,7 +26,7 @@ export type CompactSentenceSegmentLabel = {
|
|
|
25
26
|
isError?: boolean;
|
|
26
27
|
};
|
|
27
28
|
export type CompactSegmentLabel = CompactCallSegmentLabel | CompactSentenceSegmentLabel;
|
|
28
|
-
export type CompactGroupStatus = 'running' |
|
|
29
|
+
export type CompactGroupStatus = 'running' | SettledStepsStatus;
|
|
29
30
|
type CompactGroupTone = {
|
|
30
31
|
title: string;
|
|
31
32
|
detail: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compact-messages.d.ts","sources":["../../../../../src/lib/chat/trajectory/trajectories/compact-messages.tsx"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"compact-messages.d.ts","sources":["../../../../../src/lib/chat/trajectory/trajectories/compact-messages.tsx"],"names":[],"mappings":"AAaA,OAAO,EACL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAMpE,OAAO,KAAK,EAEV,aAAa,EACd,MAAM,4BAA4B,CAAC;AAapC,OAAO,EACL,KAAK,wBAAwB,EAG9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,eAAe,EACf,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIhF,KAAK,oBAAoB,GAAG;IAC1B,OAAO,EAAE,wBAAwB,CAAC;CACnC,CAAC;AAgGF,sDAAsD;AACtD,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,WAAW,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,gFAAgF;AAChF,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAA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QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAa3E;AAkCD,iBAAS,2BAA2B,CAAC,EACnC,KAAK,EAAE,aAAa,EACpB,MAAM,EACN,QAAQ,GACT,EAAE;IACD,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,+BA4BA;AAED,iBAAS,6BAA6B,gCAGrC;AAED,iBAAS,4BAA4B,CAAC,EACpC,MAAM,EAAE,cAAc,GACvB,EAAE;IACD,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,sCAkBA;AAED,iBAAS,6BAA6B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,+BA+B5E;AAED,iBAAS,wBAAwB,CAAC,EAChC,IAAI,EACJ,aAAsB,GACvB,EAAE;IACD,IAAI,EAAE,4BAA4B,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,sCA2BA;AAED,eAAO,MAAM,iBAAiB;IAC5B,KAAK;IACL,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,OAAO;CACR,CAAC;AAEF,iBAAS,eAAe,uCAevB;AA8BD,eAAO,MAAM,eAAe;IAC1B,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,UAAU;;;IACV,gBAAgB,uDA/Bf;QACD,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IA8BC,OAAO;IACP,UAAU;IACV,gBAAgB;IAChB,mBAAmB;IACnB,QAAQ;IACR,KAAK;CACN,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-actions.d.ts","sources":["../../../../../src/lib/chat/trajectory/trajectories/message-actions.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"message-actions.d.ts","sources":["../../../../../src/lib/chat/trajectory/trajectories/message-actions.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAuBjD,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,QAAQ,GACT,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,sCAYA;AAED,wBAAgB,0BAA0B,CAAC,EACzC,SAAS,GACV,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAeA;AAED,wBAAgB,gBAAgB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,+BAarE;AAED,wBAAgB,8BAA8B,CAAC,EAC7C,SAAS,GACV,EAAE;IACD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAmBA"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { CitationSource } from '../chat/citations.ts';
|
|
3
|
-
export declare function CitationPill({ source, index,
|
|
3
|
+
export declare function CitationPill({ source, index, children, }: {
|
|
4
4
|
source: CitationSource;
|
|
5
5
|
index: number;
|
|
6
|
-
/** The pill's own words, in the host's language. */
|
|
7
|
-
labels?: {
|
|
8
|
-
source: string;
|
|
9
|
-
open: string;
|
|
10
|
-
};
|
|
11
6
|
/** The host's own detail for this source, such as notices or attribution. */
|
|
12
7
|
children?: ReactNode;
|
|
13
8
|
}): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CitationPill.d.ts","sources":["../../../src/lib/components/CitationPill.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"CitationPill.d.ts","sources":["../../../src/lib/components/CitationPill.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAM3D,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,KAAK,EACL,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,+BA6CA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../../src/lib/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,EAAE,GACH,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,KAAK,cAAc,EACnB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type PluralForms = Partial<Record<Exclude<Intl.LDMLPluralRule, 'other'>, string>> & {
|
|
2
|
+
other: string;
|
|
3
|
+
};
|
|
4
|
+
export type GenaiMessageHelpers = {
|
|
5
|
+
/** The form `Intl.PluralRules` picks for `count`, with `#` as the formatted count. */
|
|
6
|
+
plural: (count: number, forms: PluralForms) => string;
|
|
7
|
+
format: (value: number) => string;
|
|
8
|
+
};
|
|
9
|
+
type Message<Args> = (args: Args, helpers: GenaiMessageHelpers) => string;
|
|
10
|
+
/** How a finished group of steps ended. */
|
|
11
|
+
export type SettledStepsStatus = 'complete' | 'error' | 'aborted';
|
|
12
|
+
export type GenaiMessages = {
|
|
13
|
+
'citation.source': Message<{
|
|
14
|
+
index: number;
|
|
15
|
+
}>;
|
|
16
|
+
'citation.open': string;
|
|
17
|
+
'message.copy': string;
|
|
18
|
+
'message.copied': string;
|
|
19
|
+
'message.regenerate': string;
|
|
20
|
+
'message.copyDebugJson': string;
|
|
21
|
+
'steps.working': string;
|
|
22
|
+
'steps.reasoning': Message<{
|
|
23
|
+
detail: string | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
'steps.reasoned': Message<{
|
|
26
|
+
detail: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
/** One finished step drawn as `name(args)`. */
|
|
29
|
+
'steps.call': Message<{
|
|
30
|
+
call: string;
|
|
31
|
+
status: SettledStepsStatus;
|
|
32
|
+
}>;
|
|
33
|
+
'steps.tools': Message<{
|
|
34
|
+
count: number;
|
|
35
|
+
status: SettledStepsStatus;
|
|
36
|
+
}>;
|
|
37
|
+
'steps.unnamedTool': string;
|
|
38
|
+
'steps.unknownStep': string;
|
|
39
|
+
};
|
|
40
|
+
export declare const en: GenaiMessages;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sources":["../../../src/lib/i18n/messages.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,CAC/B,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,CACtD,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtB,MAAM,MAAM,mBAAmB,GAAG;IAChC,sFAAsF;IACtF,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,KAAK,MAAM,CAAC;IACtD,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACnC,CAAC;AAEF,KAAK,OAAO,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,mBAAmB,KAAK,MAAM,CAAC;AAE1E,2CAA2C;AAC3C,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,CAAC;AAElE,MAAM,MAAM,aAAa,GAAG;IAC1B,iBAAiB,EAAE,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9C,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;IAC3D,gBAAgB,EAAE,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;IAC1D,+CAA+C;IAC/C,YAAY,EAAE,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAC,CAAC;IACpE,aAAa,EAAE,OAAO,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAC,CAAC;IACtE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,EAAE,EAAE,aAgChB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type GenaiMessageHelpers, type GenaiMessages } from './messages.ts';
|
|
3
|
+
export declare function GenaiMessagesProvider({ locale, dir, messages, children, }: {
|
|
4
|
+
locale: string;
|
|
5
|
+
dir?: 'ltr' | 'rtl';
|
|
6
|
+
/** The words to change; every other key keeps the enclosing provider's. */
|
|
7
|
+
messages?: Partial<GenaiMessages>;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
type MessageArgs<K extends keyof GenaiMessages> = GenaiMessages[K] extends (args: infer Args, helpers: GenaiMessageHelpers) => string ? [args: Args] : [];
|
|
11
|
+
export type GenaiTranslate = <K extends keyof GenaiMessages>(key: K, ...args: MessageArgs<K>) => string;
|
|
12
|
+
export declare function useGenaiMessages(): GenaiTranslate;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sources":["../../../src/lib/i18n/provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAC;AAE3D,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAEnB,MAAM,eAAe,CAAC;AAwBvB,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,EACN,GAA6B,EAC7B,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACpB,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAClC,QAAQ,EAAE,SAAS,CAAC;CACrB,+BASA;AAED,KAAK,WAAW,CAAC,CAAC,SAAS,MAAM,aAAa,IAAI,aAAa,CAAC,CAAC,CAAC,SAAS,CACzE,IAAI,EAAE,MAAM,IAAI,EAChB,OAAO,EAAE,mBAAmB,KACzB,MAAM,GACP,CAAC,IAAI,EAAE,IAAI,CAAC,GACZ,EAAE,CAAC;AAEP,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,SAAS,MAAM,aAAa,EACzD,GAAG,EAAE,CAAC,EACN,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,KACpB,MAAM,CAAC;AAQZ,wBAAgB,gBAAgB,IAAI,cAAc,CAgBjD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepagents/react-genai",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.49.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@ai-sdk/react": "^4.0.186",
|
|
34
|
-
"@deepagents/context": "7.
|
|
35
|
-
"@deepagents/elements": "7.
|
|
36
|
-
"@deepagents/react-formatters": "7.
|
|
37
|
-
"@deepagents/react-input": "7.
|
|
34
|
+
"@deepagents/context": "7.49.0",
|
|
35
|
+
"@deepagents/elements": "7.49.0",
|
|
36
|
+
"@deepagents/react-formatters": "7.49.0",
|
|
37
|
+
"@deepagents/react-input": "7.49.0",
|
|
38
38
|
"@types/mdast": "^4.0.4",
|
|
39
39
|
"ai": "^7.0.181",
|
|
40
40
|
"cn": "^0.4.0",
|