@veracity/ai 0.0.6 → 0.0.8

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 (79) hide show
  1. package/dist/ChatCompletionSSE.d.ts +28 -18
  2. package/dist/ChatCompletionSSE.d.ts.map +1 -1
  3. package/dist/ChatMessageItem.d.ts +5 -0
  4. package/dist/ChatMessageItem.d.ts.map +1 -0
  5. package/dist/Markdown/index.d.ts +3 -0
  6. package/dist/Markdown/index.d.ts.map +1 -0
  7. package/dist/Markdown/math.d.ts +2 -0
  8. package/dist/Markdown/math.d.ts.map +1 -0
  9. package/dist/{Markdown.d.ts → Markdown copy.d.ts } +1 -1
  10. package/dist/Markdown copy.d.ts.map +1 -0
  11. package/dist/MessageLimitExceededError.d.ts +6 -0
  12. package/dist/MessageLimitExceededError.d.ts.map +1 -0
  13. package/dist/Pyodide.d.ts +6 -0
  14. package/dist/Pyodide.d.ts.map +1 -0
  15. package/dist/Pyodide_test.d.ts +1 -0
  16. package/dist/Pyodide_test.d.ts.map +1 -0
  17. package/dist/__vite-browser-external-DYxpcVy9.js +4 -0
  18. package/dist/components/AIChat/index.d.ts +15 -10
  19. package/dist/components/AIChat/index.d.ts.map +1 -1
  20. package/dist/components/AIChatAgentMessage.d.ts +28 -0
  21. package/dist/components/AIChatAgentMessage.d.ts.map +1 -0
  22. package/dist/components/AIChatMessage.d.ts +0 -21
  23. package/dist/components/AIChatMessage.d.ts.map +1 -1
  24. package/dist/components/AIChatToolCallGroup.d.ts +16 -15
  25. package/dist/components/AIChatToolCallGroup.d.ts.map +1 -1
  26. package/dist/components/AIChatUserMessage.d.ts +14 -0
  27. package/dist/components/AIChatUserMessage.d.ts.map +1 -0
  28. package/dist/components/AIConversation.d.ts +8 -0
  29. package/dist/components/AIConversation.d.ts.map +1 -0
  30. package/dist/components/AIParent.d.ts +8 -0
  31. package/dist/components/AIParent.d.ts.map +1 -0
  32. package/dist/components/Avatar.d.ts.map +1 -1
  33. package/dist/components/ErrorNotification.d.ts +2 -0
  34. package/dist/components/ErrorNotification.d.ts.map +1 -0
  35. package/dist/components/{HighlightCode → HighlightCodeComponent}/index.d.ts +3 -3
  36. package/dist/components/HighlightCodeComponent/index.d.ts.map +1 -0
  37. package/dist/components/ToolCallComponent/TaskItemComponent.d.ts +14 -0
  38. package/dist/components/ToolCallComponent/TaskItemComponent.d.ts.map +1 -0
  39. package/dist/components/ToolCallComponent/index.d.ts +85 -0
  40. package/dist/components/ToolCallComponent/index.d.ts.map +1 -0
  41. package/dist/components/VeracityAvatar.d.ts.map +1 -1
  42. package/dist/components/icons/ArrowDown.d.ts +3 -0
  43. package/dist/components/icons/ArrowDown.d.ts.map +1 -0
  44. package/dist/components/icons/TimesCircle.d.ts +3 -0
  45. package/dist/components/icons/TimesCircle.d.ts.map +1 -0
  46. package/dist/dtos.d.ts +12 -0
  47. package/dist/dtos.d.ts.map +1 -1
  48. package/dist/enums.d.ts +17 -11
  49. package/dist/enums.d.ts.map +1 -1
  50. package/dist/jsx.d.ts +12 -0
  51. package/dist/jsx.d.ts.map +1 -0
  52. package/dist/katex-Cj8zHzei.js +11624 -0
  53. package/dist/utils/CancellationToken.d.ts +3 -3
  54. package/dist/utils/CancellationToken.d.ts.map +1 -1
  55. package/dist/utils/Channel.d.ts +13 -0
  56. package/dist/utils/Channel.d.ts.map +1 -0
  57. package/dist/utils/decodePythonTripleQuotedString.d.ts +2 -0
  58. package/dist/utils/decodePythonTripleQuotedString.d.ts.map +1 -0
  59. package/dist/utils/generateAvatarLetter.d.ts +2 -0
  60. package/dist/utils/generateAvatarLetter.d.ts.map +1 -0
  61. package/dist/utils/generateAvatarLetters.d.ts +2 -0
  62. package/dist/utils/generateAvatarLetters.d.ts.map +1 -0
  63. package/dist/utils/getElementTextPreserveNewlines.d.ts +2 -0
  64. package/dist/utils/getElementTextPreserveNewlines.d.ts.map +1 -0
  65. package/dist/utils/parsePartialJSON.d.ts +2 -0
  66. package/dist/utils/parsePartialJSON.d.ts.map +1 -0
  67. package/dist/utils/parsePythonLongStringContents.d.ts +2 -0
  68. package/dist/utils/parsePythonLongStringContents.d.ts.map +1 -0
  69. package/dist/veracity-ai.es.js +4130 -2555
  70. package/dist/veracity-ai.umd.js +277 -5
  71. package/package.json +43 -36
  72. package/dist/Markdown.d.ts.map +0 -1
  73. package/dist/SmoothChatCompletionSSE.d.ts +0 -23
  74. package/dist/SmoothChatCompletionSSE.d.ts.map +0 -1
  75. package/dist/components/AIChatBubble.d.ts +0 -7
  76. package/dist/components/AIChatBubble.d.ts.map +0 -1
  77. package/dist/components/AIChatToolCall.d.ts +0 -26
  78. package/dist/components/AIChatToolCall.d.ts.map +0 -1
  79. package/dist/components/HighlightCode/index.d.ts.map +0 -1
@@ -1,35 +1,45 @@
1
1
  import { ChatMessageDto } from "./dtos";
2
2
  import { ChatCompletionSSEMessageType, LogLevel } from "./enums";
3
- export declare class ChatCompletionSSE {
3
+ import { Channel } from "./utils/Channel";
4
+ export declare class ChatCompletionSSE extends Channel<ChatCompletionSSEMessage> {
4
5
  private _reader;
5
6
  private _buffer;
6
7
  private _bufferOffset;
7
- initializeConnectionAsync(url: string, messages: ChatMessageDto[]): Promise<void>;
8
+ private _abortController;
9
+ private _cancellationToken;
10
+ startAsync(fetch: typeof window.fetch, url: string, messages: ChatMessageDto[]): Promise<void>;
11
+ stop(): void;
8
12
  private readBytesAsync;
9
13
  private readLittleEndianInt32Async;
10
14
  private readLittleEndianDoubleAsync;
15
+ private _textDecoder;
11
16
  private readUtf8StringAsync;
12
- readMessageAsync(): Promise<ChatCompletionSSEMessage>;
17
+ private readMessageAsync;
18
+ private readMessagesAsync;
19
+ waitToReadAsync(): Promise<boolean>;
13
20
  }
14
21
  export interface ChatCompletionSSEMessage {
15
22
  type: ChatCompletionSSEMessageType;
16
- elapsed?: number;
17
- errorMarkdown?: string;
18
- parentFunctionId?: string;
19
- agentManifestName?: string;
20
- agentManifestBackgroundColor?: string;
21
- agentManifestIcon?: string;
22
- appendMessageMarkdown?: string;
23
- toolCallFunctionId?: string;
23
+ errorMarkdown?: string | null;
24
+ parentFunctionId?: string | null;
25
+ agentManifestName?: string | null;
26
+ agentManifestBackgroundColor?: string | null;
27
+ agentManifestIcon?: string | null;
28
+ appendMessageMarkdown?: string | null;
29
+ toolCallFunctionId?: string | null;
24
30
  toolCallUpdateIndex?: number;
25
- toolCallUpdateName?: string;
26
- toolCallUpdateArguments?: string;
31
+ toolCallUpdateName?: string | null;
32
+ toolCallUpdateArguments?: string | null;
27
33
  toolCallLogLevel?: LogLevel;
28
- toolCallStatusIndex?: number;
29
- toolCallStatusProgress?: number;
30
- toolCallIcon?: string;
31
- toolCallMarkdown?: string;
34
+ toolCallTaskItemId?: number;
35
+ toolCallTaskItemProgress?: number;
36
+ toolCallTaskItemIcon?: string | null;
37
+ toolCallTaskItemMarkdown?: string | null;
32
38
  toolCallTime?: number;
33
- toolCallContent?: string;
39
+ toolCallPlaintextMessage?: string | null;
40
+ toolCallMarkdownTitle?: string | null;
41
+ toolCallOperationId?: string | null;
42
+ toolCallCode?: string | null;
43
+ toolCallError?: string;
34
44
  }
35
45
  //# sourceMappingURL=ChatCompletionSSE.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatCompletionSSE.d.ts","sourceRoot":"","sources":["../src/ChatCompletionSSE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,4BAA4B,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEjE,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAA0C;IACzD,OAAO,CAAC,OAAO,CAAiC;IAChD,OAAO,CAAC,aAAa,CAAa;IAE5B,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE;YAWzD,cAAc;YA8Bd,0BAA0B;YAO1B,2BAA2B;YAO3B,mBAAmB;IAO3B,gBAAgB,IAAI,OAAO,CAA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,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB"}
@@ -0,0 +1,5 @@
1
+ import { ChatMessageDto } from "./dtos";
2
+ export interface ChatMessageItem {
3
+ toDto(): ChatMessageDto;
4
+ }
5
+ //# sourceMappingURL=ChatMessageItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatMessageItem.d.ts","sourceRoot":"","sources":["../src/ChatMessageItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC,MAAM,WAAW,eAAe;IAC9B,KAAK,IAAI,cAAc,CAAC;CACzB"}
@@ -0,0 +1,3 @@
1
+ export declare function setElementMarkdown(element: HTMLElement, markdown: string): void;
2
+ export declare function renderMathAsync(element: HTMLElement, latexCode: string): Promise<void>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Markdown/index.ts"],"names":[],"mappings":"AAWA,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,QAWxE;AAsXD,wBAAsB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,iBAS5E"}
@@ -0,0 +1,2 @@
1
+ export declare function replaceLatexMathDelimiters(markdown: string): string;
2
+ //# sourceMappingURL=math.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../src/Markdown/math.ts"],"names":[],"mappings":"AAuBA,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAqBnE"}
@@ -1,2 +1,2 @@
1
1
  export declare function setElementMarkdown(element: HTMLElement, markdown: string): void;
2
- //# sourceMappingURL=Markdown.d.ts.map
2
+ //# sourceMappingURL=Markdown%20copy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown copy.d.ts","sourceRoot":"","sources":["../src/Markdown copy.ts"],"names":[],"mappings":"AAMA,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,QASxE"}
@@ -0,0 +1,6 @@
1
+ import { ProjectUserRateLimitingSettingsDto } from "./dtos";
2
+ export declare class MessageLimitExceededError extends Error {
3
+ readonly limits: ProjectUserRateLimitingSettingsDto;
4
+ constructor(limits: ProjectUserRateLimitingSettingsDto);
5
+ }
6
+ //# sourceMappingURL=MessageLimitExceededError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageLimitExceededError.d.ts","sourceRoot":"","sources":["../src/MessageLimitExceededError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,QAAQ,CAAC;AAE5D,qBAAa,yBAA0B,SAAQ,KAAK;aACtB,MAAM,EAAE,kCAAkC;gBAA1C,MAAM,EAAE,kCAAkC;CAKvE"}
@@ -0,0 +1,6 @@
1
+ import { PyodideInterface } from "pyodide";
2
+ export declare function initializePyodideAsync(): Promise<any>;
3
+ export declare var pyodide: PyodideInterface;
4
+ export declare function runPythonCodeAsync(code: string): Promise<any>;
5
+ export declare function getImageFromPyodide(path: string): string;
6
+ //# sourceMappingURL=Pyodide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pyodide.d.ts","sourceRoot":"","sources":["../src/Pyodide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAe,MAAM,SAAS,CAAC;AAExD,OAAO,cAAc,CAAC;AAItB,wBAAgB,sBAAsB,IAAI,OAAO,CAAC,GAAG,CAAC,CAErD;AAED,eAAO,IAAI,OAAO,EAAE,gBAAgB,CAAC;AAYrC,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,gBAGpD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,UAK/C"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=Pyodide_test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pyodide_test.d.ts","sourceRoot":"","sources":["../src/Pyodide_test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ const e = {};
2
+ export {
3
+ e as default
4
+ };
@@ -1,26 +1,31 @@
1
- import { AIChatMessage } from "../AIChatMessage";
1
+ import { ChatMessageItem } from "../../ChatMessageItem";
2
2
  export interface AIChatOptions {
3
3
  userId: string;
4
- avatarLetters: string;
4
+ givenName: string;
5
+ surname: string;
6
+ displayName: string;
5
7
  url: string;
8
+ fetch?: typeof window.fetch;
9
+ }
10
+ export declare class AIChatBase {
11
+ readonly node: HTMLElement;
12
+ readonly messages: ChatMessageItem[];
13
+ constructor();
6
14
  }
7
15
  export declare class AIChat {
8
16
  readonly node: HTMLElement;
9
17
  readonly userId: string;
18
+ readonly givenName: string;
19
+ readonly surname: string;
20
+ readonly displayName: string;
10
21
  readonly avatarLetters: string;
11
22
  readonly url: string;
12
- readonly messagesNode: HTMLOListElement;
13
- readonly messages: AIChatMessage[];
23
+ readonly fetch: typeof window.fetch;
24
+ readonly chatBase: AIChatBase;
14
25
  readonly statusNode: Node;
15
26
  private _canSubmit;
16
27
  get canSubmit(): boolean;
17
28
  constructor(options: AIChatOptions);
18
- private _generatingNode;
19
- private get generatingNode();
20
- setGeneratingStatus(): void;
21
- clearStatus(): void;
22
- private _functionIdToParentFunctionId;
23
- private _groupByFunctionId;
24
29
  submitMessageAsync(message: string): Promise<void>;
25
30
  }
26
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AIChat/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA0B,aAAa,EAAqB,MAAM,kBAAkB,CAAC;AAQ5F,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAA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CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC;IACpC,QAAQ,CAAC,QAAQ,aAAoB;IACrC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAE1B,OAAO,CAAC,UAAU,CAAQ;IAE1B,IAAI,SAAS,YAEZ;gBAEW,OAAO,EAAE,aAAa;IA0D5B,kBAAkB,CAAC,OAAO,EAAE,MAAM;CA8FzC"}
@@ -0,0 +1,28 @@
1
+ import { ChatMessageItem } from "../ChatMessageItem";
2
+ import { ChatMessageDto } from "../dtos";
3
+ import { AIChat } from "./AIChat";
4
+ import { AIChatToolCallGroup } from "./AIChatToolCallGroup";
5
+ import { AIParent } from "./AIParent";
6
+ export declare class AIChatAgentMessage implements ChatMessageItem, AIParent {
7
+ readonly chat: AIChat;
8
+ readonly size: AIChatAssistantMessageSize;
9
+ readonly node: DocumentFragment;
10
+ readonly nameNode: HTMLDivElement;
11
+ readonly contentNode: HTMLDivElement;
12
+ private _currentMarkdown;
13
+ private _currentMarkdownNode;
14
+ private _latestMarkdown;
15
+ private _currentToolCallGroup;
16
+ constructor(chat: AIChat, name: string, backgroundColor: string, icon: string, size: AIChatAssistantMessageSize);
17
+ toDto(): ChatMessageDto;
18
+ appendAgentMarkdownMessage(markdown: string): void;
19
+ getOrAppendToolCallGroup(): AIChatToolCallGroup;
20
+ reset(): void;
21
+ done(): void;
22
+ }
23
+ export declare enum AIChatAssistantMessageSize {
24
+ Small = 0,
25
+ Medium = 1
26
+ }
27
+ export declare function createAvatar(name: string, backgroundColor: string, icon: string, size: AIChatAssistantMessageSize): HTMLDivElement;
28
+ //# sourceMappingURL=AIChatAgentMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIChatAgentMessage.d.ts","sourceRoot":"","sources":["../../src/components/AIChatAgentMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAwBtC,qBAAa,kBAAmB,YAAW,eAAe,EAAE,QAAQ;aAahD,IAAI,EAAE,MAAM;aAIZ,IAAI,EAAE,0BAA0B;IAhBlD,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAC;IAClC,QAAQ,CAAC,WAAW,EAAE,cAAc,CAAC;IAErC,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,oBAAoB,CAAiB;IAE7C,OAAO,CAAC,eAAe,CAAS;IAEhC,OAAO,CAAC,qBAAqB,CAAsB;gBAGjC,IAAI,EAAE,MAAM,EAC5B,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,MAAM,EACvB,IAAI,EAAE,MAAM,EACI,IAAI,EAAE,0BAA0B;IAelD,KAAK,IAAI,cAAc;IAOvB,0BAA0B,CAAC,QAAQ,EAAE,MAAM;IAY3C,wBAAwB;IAQxB,KAAK;IAKL,IAAI;CAGL;AAED,oBAAY,0BAA0B;IACpC,KAAK,IAAA;IACL,MAAM,IAAA;CACP;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,kBASjH"}
@@ -1,22 +1 @@
1
- import { AIChat } from "./AIChat";
2
- import { AIChatBubble } from "./AIChatBubble";
3
- import { ChatMessageDto } from "../dtos";
4
- /** This component basically contains a bubble element. However, any errors will be displayed below the bubble. Thus, the <li /> wraps the bubble and errors. */
5
- export declare abstract class AIChatMessage {
6
- readonly node: HTMLLIElement;
7
- readonly chat: AIChat;
8
- message: string;
9
- readonly bubble: AIChatBubble;
10
- constructor(chat: AIChat, message: any, avatar: Node);
11
- abstract toDto(): ChatMessageDto;
12
- }
13
- export declare class AIChatUserMessage extends AIChatMessage {
14
- constructor(chat: AIChat, message: any, userId: string, avatarLetters: string);
15
- toDto(): ChatMessageDto;
16
- }
17
- export declare class AIChatAssistantMessage extends AIChatMessage {
18
- constructor(chat: AIChat, message: any, avatar: Node);
19
- updateMessage(message: string): void;
20
- toDto(): ChatMessageDto;
21
- }
22
1
  //# sourceMappingURL=AIChatMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AIChatMessage.d.ts","sourceRoot":"","sources":["../../src/components/AIChatMessage.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,gKAAgK;AAChK,8BAAsB,aAAa;IACjC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;gBAElB,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI;IAWpD,QAAQ,CAAC,KAAK,IAAI,cAAc;CACjC;AAED,qBAAa,iBAAkB,SAAQ,aAAa;gBACtC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM;IAU7E,KAAK,IAAI,cAAc;CAMxB;AAED,qBAAa,sBAAuB,SAAQ,aAAa;gBAC3C,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI;IAMpD,aAAa,CAAC,OAAO,EAAE,MAAM;IAK7B,KAAK,IAAI,cAAc;CAMxB"}
1
+ {"version":3,"file":"AIChatMessage.d.ts","sourceRoot":"","sources":["../../src/components/AIChatMessage.tsx"],"names":[],"mappings":""}
@@ -1,20 +1,21 @@
1
- import { LogLevel } from "../enums";
2
- import { AIChatToolCall } from "./AIChatToolCall";
1
+ import { ToolCallComponent } from "./ToolCallComponent";
2
+ import { AIChat } from "./AIChat";
3
3
  export declare class AIChatToolCallGroup {
4
- readonly node: HTMLLIElement;
5
- readonly toolCallsNode: HTMLOListElement;
6
- readonly toolCallsByIndex: {
7
- [index: number]: AIChatToolCall;
4
+ readonly chat: AIChat;
5
+ readonly node: HTMLDivElement;
6
+ readonly preliminaryToolCallsByIndex: {
7
+ [index: number]: PreliminaryToolCall;
8
8
  };
9
- readonly toolCallsById: {
10
- [id: string]: AIChatToolCall;
9
+ readonly toolCallsByIndex: {
10
+ [index: number]: ToolCallComponent;
11
11
  };
12
- constructor();
13
- aggregate(id: string, index: number, name: string, args: string): void;
14
- completeAggregation(): void;
15
- log(id: string, logLevel: LogLevel, time: number, markdown: string): void;
16
- status(id: string, index: number, progress: number, icon: string, markdown: string): void;
17
- done(id: string): void;
18
- error(id: string): void;
12
+ constructor(chat: AIChat);
13
+ getToolCall(index: number, id: string, name: string, args: string): ToolCallComponent;
14
+ }
15
+ interface PreliminaryToolCall {
16
+ id: string;
17
+ name: string;
18
+ args: string;
19
19
  }
20
+ export {};
20
21
  //# sourceMappingURL=AIChatToolCallGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AIChatToolCallGroup.d.ts","sourceRoot":"","sources":["../../src/components/AIChatToolCallGroup.tsx"],"names":[],"mappings":"A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AM;IACP,QAAQ,CAAC,gBAAgB,EAAE;QACzB,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB,CAAC;KACpC,CAAM;gBAEqB,IAAI,EAAE,MAAM;IAIxC,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CA6ClE;AAED,UAAU,mBAAmB;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,14 @@
1
+ import { ChatMessageItem } from "../ChatMessageItem";
2
+ import { ChatMessageDto } from "../dtos";
3
+ export declare class AIChatUserMessage implements ChatMessageItem {
4
+ readonly node: HTMLLIElement;
5
+ readonly userId: string;
6
+ readonly givenName: string;
7
+ readonly surname: string;
8
+ readonly displayName: string;
9
+ readonly avatarLetters: string;
10
+ private readonly _message;
11
+ constructor(userId: string, givenName: string, surname: string, displayName: string, avatarLetters: string, message: string);
12
+ toDto(): ChatMessageDto;
13
+ }
14
+ //# sourceMappingURL=AIChatUserMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIChatUserMessage.d.ts","sourceRoot":"","sources":["../../src/components/AIChatUserMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIzC,qBAAa,iBAAkB,YAAW,eAAe;IACvD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAahC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM;IAwBjB,KAAK,IAAI,cAAc;CAMxB"}
@@ -0,0 +1,8 @@
1
+ import { AIParent } from "./AIParent";
2
+ import { AIChatAgentMessage } from "./AIChatAgentMessage";
3
+ import { ChatCompletionSSE } from "../ChatCompletionSSE";
4
+ export declare class AIConversationManager {
5
+ parentsByFunctionId: Map<string, AIParent>;
6
+ readMessagesAsync(chatCompletionSSE: ChatCompletionSSE, init: (name: string, backgroundColor: string, icon: string) => AIChatAgentMessage): Promise<void>;
7
+ }
8
+ //# sourceMappingURL=AIConversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIConversation.d.ts","sourceRoot":"","sources":["../../src/components/AIConversation.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAA4B,MAAM,sBAAsB,CAAC;AAenF,qBAAa,qBAAqB;IAChC,mBAAmB,wBAA+B;IAC5C,iBAAiB,CACrB,iBAAiB,EAAE,iBAAiB,EAEpC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,kBAAkB;CAkHpF"}
@@ -0,0 +1,8 @@
1
+ import { AIChatToolCallGroup } from "./AIChatToolCallGroup";
2
+ export interface AIParent {
3
+ appendAgentMarkdownMessage(markdown: string): void;
4
+ getOrAppendToolCallGroup(): AIChatToolCallGroup;
5
+ reset(): any;
6
+ done(): any;
7
+ }
8
+ //# sourceMappingURL=AIParent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AIParent.d.ts","sourceRoot":"","sources":["../../src/components/AIParent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,WAAW,QAAQ;IACvB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACnD,wBAAwB,IAAI,mBAAmB,CAAC;IAChD,KAAK,QAAG;IACR,IAAI,QAAG;CACR"}
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/components/Avatar.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,eAAe,GAAG;IAAE,EAAE,CAAC,MAAC;IAAC,IAAI,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC/E,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,IAC3D,CAAC,SAAS,QAAQ,GACd,eAAe,GAAG,GAAG,CAAC,cAAc,CAAC,iBAAiB,CAAC,GACvD,eAAe,GAAG,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAE3D,oBAAY,UAAU;IACpB,MAAM,cAAc;IACpB,KAAK,cAAc;IACnB,UAAU,cAAc;IACxB,eAAe,eAAe;CAC/B;AAED,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,EAC1D,EAAE,EAAE,EAAE,EAAU,EAAE,IAAuB,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC,EACzE,QAAQ,EAAE,GAAG,EAAE,sCAShB;AAED,eAAO,MAAM,2BAA2B,UAGvC,CAAC;AACF,eAAO,MAAM,4BAA4B,UAGxC,CAAC;AACF,eAAO,MAAM,yBAAyB,UAGrC,CAAC;AACF,eAAO,MAAM,0BAA0B,UAGtC,CAAC;AACF,eAAO,MAAM,8BAA8B,UAG1C,CAAC;AACF,eAAO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AAC;AAEF,wBAAgB,2BAA2B,CAAC,EAAE,EAAE,MAAM,YAGrD"}
@@ -0,0 +1,2 @@
1
+ export declare function ErrorNotification(props: JSX.HTMLAttributes<HTMLDivElement>, children: any[]): HTMLDivElement;
2
+ //# sourceMappingURL=ErrorNotification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorNotification.d.ts","sourceRoot":"","sources":["../../src/components/ErrorNotification.tsx"],"names":[],"mappings":"AAGA,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,GAAG,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,kBAS3F"}
@@ -1,8 +1,8 @@
1
- export declare class HighlightCode {
1
+ export declare class HighlightCodeComponent {
2
2
  readonly node: HTMLElement;
3
3
  readonly codeNode: HTMLElement;
4
- language: string;
5
- code: string;
4
+ private _language;
5
+ private _code;
6
6
  constructor(language: string, code: string);
7
7
  private _ct;
8
8
  private updateCodeAsync;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/HighlightCodeComponent/index.tsx"],"names":[],"mappings":"AAGA,qBAAa,sBAAsB;IACjC,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAE/B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,KAAK,CAAS;gBAEV,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;IAK1C,OAAO,CAAC,GAAG,CAAoB;YAEjB,eAAe;IAiB7B,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM;CAK1C"}
@@ -0,0 +1,14 @@
1
+ export declare class TaskItemComponent {
2
+ readonly node: DocumentFragment;
3
+ private _icon;
4
+ private _iconNode;
5
+ private _markdown;
6
+ private _markdownNode;
7
+ constructor(icon: string, markdown: string);
8
+ get icon(): string;
9
+ set icon(value: string);
10
+ get markdown(): string;
11
+ set markdown(value: string);
12
+ status(progress: number, icon: string, markdown: string): void;
13
+ }
14
+ //# sourceMappingURL=TaskItemComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TaskItemComponent.d.ts","sourceRoot":"","sources":["../../../src/components/ToolCallComponent/TaskItemComponent.tsx"],"names":[],"mappings":"AAUA,qBAAa,iBAAiB;IAC5B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,SAAS,CAAY;IAE7B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,aAAa,CAAkB;gBAE3B,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAa1C,IAAI,IAAI,IAIQ,MAAM,CAFrB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAKrB;IAED,IAAI,QAAQ,IAIQ,MAAM,CAFzB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,MAAM,EAKzB;IAED,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAIxD"}
@@ -0,0 +1,85 @@
1
+ import { LogLevel } from "../../enums";
2
+ import { AIChat } from "../AIChat";
3
+ import { AIChatToolCallGroup } from "../AIChatToolCallGroup";
4
+ import { AIParent } from "../AIParent";
5
+ export declare class ToolCallComponent implements AIParent {
6
+ readonly chat: AIChat;
7
+ readonly functionIndex: number;
8
+ readonly functionName: string;
9
+ functionAccumulatedArguments: string;
10
+ readonly node: HTMLDivElement;
11
+ functionId: string;
12
+ private readonly _titleNode;
13
+ private _titleStatusIconNode;
14
+ private _titleTextNode;
15
+ private readonly _bodyWrapperNode;
16
+ private readonly _bodyNode;
17
+ private _taskItemsById;
18
+ /**
19
+ *
20
+ * @param functionIndex The index represents the ToolCallIndex property refered to here: https://learn.microsoft.com/en-us/dotnet/api/overview/azure/ai.openai-readme?view=azure-dotnet-preview.
21
+ * @param expanded Whether the box representing the tool call is expanded or not.
22
+ */
23
+ constructor(chat: AIChat, functionIndex: number, // The index represents the ToolCallIndex property mentioned here: https://learn.microsoft.com/en-us/dotnet/api/overview/azure/ai.openai-readme?view=azure-dotnet-preview
24
+ functionName: string, functionAccumulatedArguments: string, expanded?: boolean);
25
+ /**
26
+ * Whether the box (node) representing the tool call is expanded or not.
27
+ * @returns {boolean}
28
+ */
29
+ get expanded(): boolean;
30
+ private _expanded;
31
+ /**
32
+ * Setting this effectively expands or collapses the box (node) representing the tool call.
33
+ * @param {boolean} value - A value indicating whether the box is expanded or not.
34
+ */
35
+ set expanded(value: boolean);
36
+ /**
37
+ * This method gets called by the code responsible for interpreting the protocol and routing data to the correct components.
38
+ * It contains the latest part of the arguments for a tool call.
39
+ * By accumulating the argument parts, we should end up with a JSON object. The back-end should use this JSON object to perform whatever action it wants.
40
+ * See the 'Use chat tools' section: https://learn.microsoft.com/en-us/dotnet/api/overview/azure/ai.openai-readme?view=azure-dotnet-preview.
41
+ * Usually, we don't display the arguments to the user.
42
+ * However, we shall make an exception for the tool named 'python' (aka. code interpreter), and display the code that will eventually be executed, to the user.
43
+ */
44
+ appendArguments(args: string): void;
45
+ private invalidatePythonArguments;
46
+ private _highlightCode;
47
+ private extractCodeFromAccumulatedArguments;
48
+ /**
49
+ * Triggered by ChatCompletionSSEMessageType.ToolCallPython.
50
+ * The web browser will execute the Python code and send the result to the back-end.
51
+ * By leveraging the browser, we don't get the expenditure of running and provisioning Python interpreters on the back-end.
52
+ * There is a 1 min timeout for the Python code to execute. If it takes longer, the back-end will terminate the execution and send an error message to the browser.
53
+ */
54
+ python(operationId: string, code: string): Promise<void>;
55
+ private appendPythonResultRow;
56
+ private _pythonStdouterrContainerNode;
57
+ private _pythonStdouterrNode;
58
+ private appendPythonStdouterr;
59
+ /**
60
+ * Triggered by ChatCompletionSSEMessageType.Init.
61
+ * The back-end issues this command when a conversation is about to start with an agent.
62
+ * Since we are inside a tool call, this means that the conversation is with a sub-agent (nested agent).
63
+ * The parameters are used for the avatar.
64
+ * We will simply store the values and wait for appendAgentMarkdownMessage(...) to be called, which should subsequently be issued by the back-end.
65
+ */
66
+ initAgent(name: string, backgroundColor: string, icon: string): void;
67
+ private _agentName;
68
+ private _agentBackgroundColor;
69
+ private _agentIcon;
70
+ appendAgentMarkdownMessage(markdown: string): void;
71
+ getOrAppendToolCallGroup(): AIChatToolCallGroup;
72
+ private getOrAppendGridLayoutNode;
73
+ private _gridLayoutNode;
74
+ private getOrAppendAgentMessage;
75
+ private _agentMessage;
76
+ reset(): void;
77
+ /** Currently not in use */
78
+ log(logLevel: LogLevel, time: number, markdown: string): void;
79
+ setTaskItemStatus(id: number, progress: number, icon: string, markdown: string): void;
80
+ setTitle(markdown: string): void;
81
+ done(): void;
82
+ error(error: string): void;
83
+ private appendError;
84
+ }
85
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ToolCallComponent/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAkE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAIvG,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AASvC,qBAAa,iBAAkB,YAAW,QAAQ;aAoB9B,IAAI,EAAE,MAAM;aACZ,aAAa,EAAE,MAAM;aACrB,YAAY,EAAE,MAAM;IAC7B,4BAA4B,EAAE,MAAM;IAtB7C,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAE9B,UAAU,EAAE,MAAM,CAAC;IAEnB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAiB;IAC5C,OAAO,CAAC,oBAAoB,CAAO;IACnC,OAAO,CAAC,cAAc,CAAuB;IAE7C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,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Q,EAAE,MAAM;IAEtD,iBAAiB,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAU9E,QAAQ,CAAC,QAAQ,EAAE,MAAM;IAIzB,IAAI;IAiBJ,KAAK,CAAC,KAAK,EAAE,MAAM;IAyBnB,OAAO,CAAC,WAAW;CAYpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"VeracityAvatar.d.ts","sourceRoot":"","sources":["../../src/components/VeracityAvatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,WAAW,EAAE,MAAM,UAAU,CAAC;AAG/C,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,EAClE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,sCAStB"}
1
+ {"version":3,"file":"VeracityAvatar.d.ts","sourceRoot":"","sources":["../../src/components/VeracityAvatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,WAAW,EAAE,MAAM,UAAU,CAAC;AAG/C,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,CAAC,iBAAiB,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,sCAQ1F"}
@@ -0,0 +1,3 @@
1
+ import { IconProps } from "./IconProps";
2
+ export declare function ArrowDown({ size, ...props }: IconProps): SVGElement;
3
+ //# sourceMappingURL=ArrowDown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrowDown.d.ts","sourceRoot":"","sources":["../../../src/components/icons/ArrowDown.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAY,MAAM,aAAa,CAAC;AAElD,wBAAgB,SAAS,CAAC,EAAE,IAAsB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,cAqBxE"}
@@ -0,0 +1,3 @@
1
+ import { IconProps } from "./IconProps";
2
+ export declare function TimesCircle({ size, ...props }: IconProps): SVGElement;
3
+ //# sourceMappingURL=TimesCircle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimesCircle.d.ts","sourceRoot":"","sources":["../../../src/components/icons/TimesCircle.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAY,MAAM,aAAa,CAAC;AAElD,wBAAgB,WAAW,CAAC,EAAE,IAAsB,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,cAqB1E"}
package/dist/dtos.d.ts CHANGED
@@ -1,3 +1,11 @@
1
+ import { ChatCompletionsOptionsType } from "./enums";
2
+ export interface ChatCompletionsOptionsDto {
3
+ type: ChatCompletionsOptionsType;
4
+ messages?: ChatMessageDto[];
5
+ operationId?: string;
6
+ operationResultAsString?: string;
7
+ operationError?: string;
8
+ }
1
9
  export interface ChatMessageDto {
2
10
  role: "assistant" | "user" | "tool";
3
11
  content: string;
@@ -15,4 +23,8 @@ export interface ToolCallUpdateDto {
15
23
  args: string;
16
24
  idx: number;
17
25
  }
26
+ export interface ProjectUserRateLimitingSettingsDto {
27
+ maxMessages: number;
28
+ maxMessagesPerHours: number;
29
+ }
18
30
  //# sourceMappingURL=dtos.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dtos.d.ts","sourceRoot":"","sources":["../src/dtos.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,kCAAkC,EAAE,CAAC;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAID,MAAM,WAAW,kCAAkC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb"}
1
+ {"version":3,"file":"dtos.d.ts","sourceRoot":"","sources":["../src/dtos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAErD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,0BAA0B,CAAC;IACjC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,CAAC;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,kCAAkC,EAAE,CAAC;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAID,MAAM,WAAW,kCAAkC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kCAAkC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;CAC7B"}
package/dist/enums.d.ts CHANGED
@@ -1,15 +1,21 @@
1
+ export declare enum ChatCompletionsOptionsType {
2
+ Messages = 0,
3
+ OperationResultAsString = 1,
4
+ OperationError = 2
5
+ }
1
6
  export declare enum ChatCompletionSSEMessageType {
2
- Init = 0,
3
- Done = 1,// Conversation ended successfully, before the connection is terminated
4
- Error = 2,// <Markdown str> The error message, in markdown, before the connection is terminated
5
- AgentManifest = 3,// <pfunc id str><name str><bg col str><icon str> Similar to a Web app manifest, but for an agent. This information is mostly used to display e.g. the avatar.
6
- AppendMessage = 4,// <pfunc id str><Markdown str> The message to append to the current message, in the context of the current function
7
- ToolCallUpdate = 5,// <pfunc id str><func id str><idx int><name str><args str>
8
- Loop = 6,// <pfunc id>
9
- ToolCallStatus = 7,// <func id str><idx int><progress double><icon str><Markdown str> Status text displayed on the UI
10
- ToolCallLog = 8,// <func id str><log level byte><time long><Markdown str> Log message line
11
- ToolCallDone = 9,// <func id str>//<content str><icon str><Markdown str> Done message displayed on the UI
12
- ToolCallError = 10
7
+ Init = 0,// <pfunc id><name><bg col><icon> Similar to a Web app manifest, but for an agent. This information is mostly used to display e.g. the avatar.
8
+ Done = 1,// <pfunc id> Conversation ended successfully, before the connection is terminated
9
+ Error = 2,// <pfunc id><Markdown> The error message, in markdown, before the connection is terminated
10
+ AppendMessage = 3,// <pfunc id><Markdown> The message to append to the current message, in the context of the current function
11
+ ToolCallUpdate = 4,// <pfunc id><func id><idx int><name><args>
12
+ Loop = 5,// <pfunc id>
13
+ ToolCallTaskItemStatus = 6,// <pfunc id><func id><id int><progress double><icon><Markdown> Status text displayed on the UI
14
+ ToolCallTitle = 7,// <pfunc id><func id><name><bg col><icon><title>
15
+ ToolCallLog = 8,// <pfunc id><func id><log level byte><time long><Markdown> Log message line
16
+ ToolCallPython = 9,// <pfunc id><func id><operation id><code>
17
+ ToolCallDone = 10,// <pfunc id><func id>//<content><icon><Markdown> Done message displayed on the UI
18
+ ToolCallError = 11
13
19
  }
14
20
  export declare enum ChatCompletionSSEMessageStatusIcon {
15
21
  Progress = "progress",
@@ -1 +1 @@
1
- {"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../src/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,4BAA4B;IACtC,IAAI,IAAA;IACJ,IAAI,IAAA,CAAE,uEAAuE;IAC7E,KAAK,IAAA,CAAE,qFAAqF;IAC5F,aAAa,IAAA,CAAE,8JAA8J;IAC7K,aAAa,IAAA,CAAE,oHAAoH;IACnI,cAAc,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