@iblai/web-utils 1.8.0 → 1.8.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/web-utils",
3
- "version": "1.7.3",
3
+ "version": "1.8.0",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,11 +1,14 @@
1
1
  import { type Reducer } from "@reduxjs/toolkit";
2
2
  import type { AdvancedTab } from "../../utils";
3
- import type { Message } from "../../hooks/chat/use-chat-v2";
3
+ import type { Message, ToolCallInfo } from "../../hooks/chat/use-chat-v2";
4
4
  export type ChatState = Record<AdvancedTab, Message[]>;
5
5
  export type SessionIds = Record<AdvancedTab, string>;
6
6
  export type StreamingMessage = {
7
7
  id: string;
8
8
  content: string;
9
+ reasoningContent: string;
10
+ toolCalls: ToolCallInfo[];
11
+ isReasoning: boolean;
9
12
  };
10
13
  export type StreamingArtifact = {
11
14
  id?: number;
@@ -53,6 +56,8 @@ export type ChatSliceState = {
53
56
  artifactsEnabled: boolean;
54
57
  streamingArtifactContentBuffer: string;
55
58
  lastArtifactContentFlushTime: number;
59
+ streamingReasoningContentBuffer: string;
60
+ lastReasoningContentFlushTime: number;
56
61
  metadata: {
57
62
  edxCourseId: string;
58
63
  edxUsageId: string;
@@ -148,3 +153,12 @@ export declare const selectLastArtifactContentFlushTime: (state: {
148
153
  export declare const selectStreamingArtifactFullContent: (state: {
149
154
  chatSliceShared: ChatSliceState;
150
155
  }) => string | null;
156
+ export declare const selectStreamingReasoningContent: (state: {
157
+ chatSliceShared: ChatSliceState;
158
+ }) => string;
159
+ export declare const selectIsReasoning: (state: {
160
+ chatSliceShared: ChatSliceState;
161
+ }) => boolean;
162
+ export declare const selectStreamingToolCalls: (state: {
163
+ chatSliceShared: ChatSliceState;
164
+ }) => ToolCallInfo[];
@@ -9,6 +9,13 @@ export interface MessageAction {
9
9
  type: "primary" | "danger";
10
10
  actionType: MessageActionTypes;
11
11
  }
12
+ export interface ToolCallInfo {
13
+ id: string;
14
+ name: string;
15
+ input?: Record<string, unknown>;
16
+ log: string;
17
+ result: string;
18
+ }
12
19
  export interface FileAttachment {
13
20
  fileName: string;
14
21
  fileType: string;
@@ -64,6 +71,8 @@ export interface Message {
64
71
  actions?: MessageAction[];
65
72
  fileAttachments?: FileAttachment[];
66
73
  artifactVersions?: ArtifactVersion[];
74
+ reasoningContent?: string;
75
+ toolCalls?: ToolCallInfo[];
67
76
  }
68
77
  export type ArtifactPayload = {
69
78
  title: string;
@@ -1,4 +1,4 @@
1
- import { type ServiceWorkerStatus } from '../services/register-sw';
1
+ import { type ServiceWorkerStatus } from "../services/register-sw";
2
2
  interface ServiceWorkerContextValue {
3
3
  status: ServiceWorkerStatus;
4
4
  applyUpdate: () => void;
@@ -43,6 +43,7 @@ export declare const TOOLS: {
43
43
  readonly GOOGLE_SLIDES: "google-slides";
44
44
  readonly GOOGLE_DOCUMENT: "google-docs";
45
45
  };
46
+ export declare const TOOL_NAME_MAP: Record<string, string>;
46
47
  export declare const REQUIRED_ACTIONS_FOR_GROUPS: {
47
48
  readonly NOTIFICATIONS: "Ibl.Notifications/Notification/action";
48
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/web-utils",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",