@veracity/ai 0.0.17 → 2.0.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 (111) hide show
  1. package/dist/{ChatCompletionSSE.d.ts → ChatClient.d.ts} +22 -13
  2. package/dist/ChatClient.d.ts.map +1 -0
  3. package/dist/ChatMessageItem.d.ts +1 -1
  4. package/dist/ClientFunctionInvocation.d.ts +14 -0
  5. package/dist/ClientFunctionInvocation.d.ts.map +1 -0
  6. package/dist/ClientFunctionInvocationContext.d.ts +10 -0
  7. package/dist/ClientFunctionInvocationContext.d.ts.map +1 -0
  8. package/dist/Markdown/index.d.ts +2 -2
  9. package/dist/Markdown/index.d.ts.map +1 -1
  10. package/dist/Markdown/math.d.ts.map +1 -1
  11. package/dist/MaxInputLimitReachedError.d.ts +4 -0
  12. package/dist/MaxInputLimitReachedError.d.ts.map +1 -0
  13. package/dist/Pyodide.d.ts +1 -1
  14. package/dist/Pyodide.d.ts.map +1 -1
  15. package/dist/ToolCallBuilder.d.ts +13 -0
  16. package/dist/ToolCallBuilder.d.ts.map +1 -0
  17. package/dist/UnexpectedEndOfStreamError.d.ts +4 -0
  18. package/dist/UnexpectedEndOfStreamError.d.ts.map +1 -0
  19. package/dist/components/Button.d.ts +1 -0
  20. package/dist/components/Button.d.ts.map +1 -1
  21. package/dist/components/ButtonOptionsDialog.d.ts +27 -0
  22. package/dist/components/ButtonOptionsDialog.d.ts.map +1 -0
  23. package/dist/components/Chat/index.d.ts +39 -0
  24. package/dist/components/Chat/index.d.ts.map +1 -0
  25. package/dist/components/Conversation.d.ts +54 -0
  26. package/dist/components/Conversation.d.ts.map +1 -0
  27. package/dist/components/ConversationMessage.d.ts +53 -0
  28. package/dist/components/ConversationMessage.d.ts.map +1 -0
  29. package/dist/components/PythonCodeInterpreter.d.ts +38 -0
  30. package/dist/components/PythonCodeInterpreter.d.ts.map +1 -0
  31. package/dist/components/Search.d.ts +16 -0
  32. package/dist/components/Search.d.ts.map +1 -0
  33. package/dist/components/icons/AngleDown.d.ts +3 -0
  34. package/dist/components/icons/AngleDown.d.ts.map +1 -0
  35. package/dist/components/icons/ArrowDown.d.ts +1 -1
  36. package/dist/components/icons/Check.d.ts +1 -1
  37. package/dist/components/icons/CheckCircle.d.ts +3 -0
  38. package/dist/components/icons/CheckCircle.d.ts.map +1 -0
  39. package/dist/components/icons/ExclamationCircle.d.ts +1 -1
  40. package/dist/components/icons/ExclamationTriangle.d.ts +1 -1
  41. package/dist/components/icons/InfoCircle.d.ts +1 -1
  42. package/dist/components/icons/QuestionCircle.d.ts +1 -1
  43. package/dist/components/icons/SearchIcon.d.ts +3 -0
  44. package/dist/components/icons/SearchIcon.d.ts.map +1 -0
  45. package/dist/components/icons/Spinner.d.ts +1 -1
  46. package/dist/components/icons/Times.d.ts +3 -0
  47. package/dist/components/icons/Times.d.ts.map +1 -0
  48. package/dist/components/icons/TimesCircle.d.ts +1 -1
  49. package/dist/core-CdG-ENX3.js +1069 -0
  50. package/dist/{csharp-Cigc7XMa.js → csharp-EkcwwkCa.js} +18 -13
  51. package/dist/{css-B-yPI1XM.js → css-CJS6IEi0.js} +127 -18
  52. package/dist/dtos.d.ts +34 -4
  53. package/dist/dtos.d.ts.map +1 -1
  54. package/dist/enums.d.ts +13 -29
  55. package/dist/enums.d.ts.map +1 -1
  56. package/dist/index.d.ts +2 -2
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/{javascript-CDslspYb.js → javascript-B2FVNeJt.js} +26 -24
  59. package/dist/{katex-Cj8zHzei.js → katex-c21813vb.js} +454 -428
  60. package/dist/{python-CzH_tl5q.js → python-CymlFLB0.js} +21 -19
  61. package/dist/{typescript-Bx5cZccb.js → typescript-Cg8DWaxm.js} +163 -148
  62. package/dist/utils/CancellationToken.d.ts.map +1 -1
  63. package/dist/utils/Channel.d.ts +42 -1
  64. package/dist/utils/Channel.d.ts.map +1 -1
  65. package/dist/utils/animateAsync.d.ts +1 -1
  66. package/dist/utils/createDeferred.d.ts.map +1 -1
  67. package/dist/utils/parsePartialJSON.d.ts +1 -1
  68. package/dist/utils/parsePartialJSON.d.ts.map +1 -1
  69. package/dist/veracity-ai.es.js +5359 -5416
  70. package/dist/veracity-ai.umd.js +37 -40
  71. package/package.json +71 -43
  72. package/dist/ChatCompletionSSE.d.ts.map +0 -1
  73. package/dist/Markdown copy.d.ts +0 -2
  74. package/dist/Markdown copy.d.ts.map +0 -1
  75. package/dist/MessageLimitExceededError.d.ts +0 -6
  76. package/dist/MessageLimitExceededError.d.ts.map +0 -1
  77. package/dist/Pyodide_test.d.ts +0 -1
  78. package/dist/Pyodide_test.d.ts.map +0 -1
  79. package/dist/components/AIChat/index.d.ts +0 -42
  80. package/dist/components/AIChat/index.d.ts.map +0 -1
  81. package/dist/components/AIChatAgentMessage.d.ts +0 -28
  82. package/dist/components/AIChatAgentMessage.d.ts.map +0 -1
  83. package/dist/components/AIChatMessage.d.ts +0 -1
  84. package/dist/components/AIChatMessage.d.ts.map +0 -1
  85. package/dist/components/AIChatToolCallGroup.d.ts +0 -21
  86. package/dist/components/AIChatToolCallGroup.d.ts.map +0 -1
  87. package/dist/components/AIChatUserMessage.d.ts +0 -14
  88. package/dist/components/AIChatUserMessage.d.ts.map +0 -1
  89. package/dist/components/AIConversation.d.ts +0 -8
  90. package/dist/components/AIConversation.d.ts.map +0 -1
  91. package/dist/components/AIParent.d.ts +0 -8
  92. package/dist/components/AIParent.d.ts.map +0 -1
  93. package/dist/components/ErrorNotification.d.ts +0 -2
  94. package/dist/components/ErrorNotification.d.ts.map +0 -1
  95. package/dist/components/ToolCallComponent/TaskItemComponent.d.ts +0 -14
  96. package/dist/components/ToolCallComponent/TaskItemComponent.d.ts.map +0 -1
  97. package/dist/components/ToolCallComponent/index.d.ts +0 -86
  98. package/dist/components/ToolCallComponent/index.d.ts.map +0 -1
  99. package/dist/components/VeracityAvatar.d.ts +0 -3
  100. package/dist/components/VeracityAvatar.d.ts.map +0 -1
  101. package/dist/components/VeracityLogoSquare.d.ts +0 -3
  102. package/dist/components/VeracityLogoSquare.d.ts.map +0 -1
  103. package/dist/core-Diwflo5W.js +0 -1077
  104. package/dist/modals.d.ts +0 -9
  105. package/dist/modals.d.ts.map +0 -1
  106. package/dist/utils/decodePythonTripleQuotedString.d.ts +0 -2
  107. package/dist/utils/decodePythonTripleQuotedString.d.ts.map +0 -1
  108. package/dist/utils/generateAvatarLetter.d.ts +0 -2
  109. package/dist/utils/generateAvatarLetter.d.ts.map +0 -1
  110. package/dist/utils/getElementTextPreserveNewlines.d.ts +0 -2
  111. package/dist/utils/getElementTextPreserveNewlines.d.ts.map +0 -1
@@ -1,13 +1,54 @@
1
- import { CancellationToken } from "./CancellationToken";
1
+ import { CancellationToken } from './CancellationToken';
2
+ /**
3
+ * A generic asynchronous channel inspired by C# channels (https://learn.microsoft.com/en-us/dotnet/core/extensions/channels).
4
+ *
5
+ * This class facilitates asynchronous communication between producers and consumers,
6
+ * allowing items of type `T` to be written to and read from a queue. It supports
7
+ * cancellation tokens for managing asynchronous operations and can signal completion
8
+ * with or without errors.
9
+ *
10
+ * **Key Features:**
11
+ * - **Asynchronous Readiness:** Consumers can wait asynchronously for items to become available.
12
+ * - **Cancellation Support:** Asynchronous operations can be cancelled using `CancellationToken`.
13
+ * - **Completion Signaling:** The channel can be marked as completed, optionally with an error.
14
+ * - **Single Reader Limitation:** Currently supports a single consumer; multiple readers are not supported.
15
+ *
16
+ * @typeParam T - The type of items stored in the channel.
17
+ */
2
18
  export declare class Channel<T> {
3
19
  private _queue;
4
20
  private _waitToReadDeferred;
5
21
  private _isCompleted;
22
+ /**
23
+ * Resolves the deferred promise waiting to read.
24
+ * @param value - Indicates if data is available to read.
25
+ */
6
26
  private resolveWaitToReadDeferred;
27
+ /**
28
+ * Marks the channel as completed. No more items can be written after this call.
29
+ */
7
30
  complete(): void;
31
+ /**
32
+ * Completes the channel with an error. No more items can be written after this call.
33
+ * @param reason - The reason for the error.
34
+ */
8
35
  completeWithError(reason?: any): void;
36
+ /**
37
+ * Attempts to write an item to the channel.
38
+ * @param item - The item to write.
39
+ * @returns True if the item was written; false if the channel is completed.
40
+ */
9
41
  tryWrite(item: T): boolean;
42
+ /**
43
+ * Waits asynchronously until data is available to read or the channel is completed.
44
+ * @param cancellationToken - Token to cancel the operation.
45
+ * @returns A promise that resolves to true if data is available, or false if the channel is completed.
46
+ */
10
47
  waitToReadAsync(cancellationToken: CancellationToken): Promise<boolean>;
48
+ /**
49
+ * Reads all available items from the channel.
50
+ * @returns An array of items.
51
+ */
11
52
  read(): T[];
12
53
  }
13
54
  //# sourceMappingURL=Channel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Channel.d.ts","sourceRoot":"","sources":["../../src/utils/Channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,qBAAa,OAAO,CAAC,CAAC;IACpB,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,mBAAmB,CAAoB;IAC/C,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO,CAAC,yBAAyB;IASjC,QAAQ,IAAI,IAAI;IAMhB,iBAAiB,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI;IAWrC,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO;IAO1B,eAAe,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IA0BvE,IAAI,IAAI,CAAC,EAAE;CAKZ"}
1
+ {"version":3,"file":"Channel.d.ts","sourceRoot":"","sources":["../../src/utils/Channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,OAAO,CAAC,CAAC;IACpB,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,mBAAmB,CAAoB;IAC/C,OAAO,CAAC,YAAY,CAAS;IAE7B;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IASjC;;OAEG;IACH,QAAQ,IAAI,IAAI;IAMhB;;;OAGG;IACH,iBAAiB,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,IAAI;IAWrC;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,CAAC,GAAG,OAAO;IAO1B;;;;OAIG;IACH,eAAe,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC;IA4BvE;;;OAGG;IACH,IAAI,IAAI,CAAC,EAAE;CAKZ"}
@@ -1,3 +1,3 @@
1
- import { CancellationToken } from "./CancellationToken";
1
+ import { CancellationToken } from './CancellationToken';
2
2
  export declare function animateAsync(animatable: Animatable, keyframes: Keyframe[] | PropertyIndexedKeyframes | null, options?: number | KeyframeAnimationOptions, cancellationToken?: CancellationToken): Promise<void>;
3
3
  //# sourceMappingURL=animateAsync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createDeferred.d.ts","sourceRoot":"","sources":["../../src/utils/createDeferred.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5B,MAAM,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B;AAED,wBAAgB,cAAc,CAAC,CAAC,iBAO/B"}
1
+ {"version":3,"file":"createDeferred.d.ts","sourceRoot":"","sources":["../../src/utils/createDeferred.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC5B,MAAM,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;CAC/B;AAED,wBAAgB,cAAc,CAAC,CAAC,KAMS,QAAQ,CAAC,CAAC,CAAC,CACnD"}
@@ -1,2 +1,2 @@
1
- export declare function parsePartialJSON(json: string): any;
1
+ export declare function parsePartialJSON<T = any>(json: string): T;
2
2
  //# sourceMappingURL=parsePartialJSON.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"parsePartialJSON.d.ts","sourceRoot":"","sources":["../../src/utils/parsePartialJSON.ts"],"names":[],"mappings":"AACA,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,OAiC5C"}
1
+ {"version":3,"file":"parsePartialJSON.d.ts","sourceRoot":"","sources":["../../src/utils/parsePartialJSON.ts"],"names":[],"mappings":"AACA,wBAAgB,gBAAgB,CAAC,CAAC,GAAG,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAiCzD"}