@acontext/acontext 0.1.8 → 0.1.9
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.
|
@@ -50,7 +50,7 @@ export interface ClaudeAgentStorageOptions {
|
|
|
50
50
|
sessionId?: string;
|
|
51
51
|
/** Optional user identifier passed to `sessions.create()`. */
|
|
52
52
|
user?: string;
|
|
53
|
-
/** Whether to store ThinkingBlock content as
|
|
53
|
+
/** Whether to store ThinkingBlock content as native thinking blocks. Default: false. */
|
|
54
54
|
includeThinking?: boolean;
|
|
55
55
|
/**
|
|
56
56
|
* Optional error callback invoked when `storeMessage` raises.
|
|
@@ -127,7 +127,11 @@ function convertBlock(block, role, includeThinking) {
|
|
|
127
127
|
if (!thinkingText) {
|
|
128
128
|
return null; // empty thinking text
|
|
129
129
|
}
|
|
130
|
-
return {
|
|
130
|
+
return {
|
|
131
|
+
type: 'thinking',
|
|
132
|
+
thinking: thinkingText,
|
|
133
|
+
signature: block.signature ?? '',
|
|
134
|
+
};
|
|
131
135
|
}
|
|
132
136
|
case 'tool_use': {
|
|
133
137
|
if (role !== 'assistant') {
|
package/dist/types/session.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ export declare const AssetSchema: z.ZodObject<{
|
|
|
11
11
|
size_b: z.ZodNumber;
|
|
12
12
|
}, z.core.$strip>;
|
|
13
13
|
export type Asset = z.infer<typeof AssetSchema>;
|
|
14
|
+
/**
|
|
15
|
+
* Message part schema.
|
|
16
|
+
* Part type is one of: 'text', 'image', 'audio', 'video', 'file', 'tool-call', 'tool-result', 'data', 'thinking'.
|
|
17
|
+
*/
|
|
14
18
|
export declare const PartSchema: z.ZodObject<{
|
|
15
19
|
type: z.ZodString;
|
|
16
20
|
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
package/dist/types/session.js
CHANGED
|
@@ -13,6 +13,10 @@ exports.AssetSchema = zod_1.z.object({
|
|
|
13
13
|
mime: zod_1.z.string(),
|
|
14
14
|
size_b: zod_1.z.number(),
|
|
15
15
|
});
|
|
16
|
+
/**
|
|
17
|
+
* Message part schema.
|
|
18
|
+
* Part type is one of: 'text', 'image', 'audio', 'video', 'file', 'tool-call', 'tool-result', 'data', 'thinking'.
|
|
19
|
+
*/
|
|
16
20
|
exports.PartSchema = zod_1.z.object({
|
|
17
21
|
type: zod_1.z.string(),
|
|
18
22
|
text: zod_1.z.string().nullable().optional(),
|