Skip to content

Commit e6f22c8

Browse files
cdxkerskeptrunedev
authored andcommitted
release: merged divergent ts-sdk releases into v0.0.104
1 parent 850a391 commit e6f22c8

File tree

6 files changed

+18
-35
lines changed

6 files changed

+18
-35
lines changed

clients/search-component/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"react-two-thumb-input-range": "^1.0.7",
8888
"remark-gfm": "^4.0.1",
8989
"tailwind-merge": "^3.0.2",
90-
"trieve-ts-sdk": "^0.0.102"
90+
"trieve-ts-sdk": "^0.0.104"
9191
},
9292
"peerDependencies": {
9393
"react": "^18.3.1 || ^19.0.0-rc",

clients/search-component/src/utils/hooks/chat-context.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,11 @@ function ChatProvider({ children }: { children: React.ReactNode }) {
801801
[]
802802
).splice(0, 1)
803803
: undefined;
804-
const jsonOfFirstChunk = {title: (firstChunk?.metadata as any)["title"], "Description": firstChunk?.chunk_html,"price": firstChunk?.num_value};
804+
const jsonOfFirstChunk = {
805+
title: (firstChunk?.metadata as any)["title"],
806+
Description: firstChunk?.chunk_html,
807+
price: firstChunk?.num_value,
808+
};
805809
return retryOperation(async () => {
806810
const relevanceToolCallResp =
807811
await trieveSDK.getToolCallFunctionParams(

clients/ts-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"files": [
1818
"dist"
1919
],
20-
"version": "0.0.103",
20+
"version": "0.0.104",
2121
"license": "MIT",
2222
"scripts": {
2323
"lint": "eslint 'src/**/*.ts'",

clients/ts-sdk/src/functions/chunks/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,17 @@ export async function ragOnChunkReaderWithQueryId(
288288
props: GenerateOffChunksReqPayload,
289289
signal?: AbortSignal,
290290
parseHeaders?: (headers: Record<string, string>) => void,
291+
overrideFetch: boolean = false
291292
) {
292293
if (!this.datasetId) {
293294
throw new Error("datasetId is required");
294295
}
295296

296-
const cleanFetch = getCleanFetch();
297-
const fetchToUse = cleanFetch ?? fetch;
297+
let fetchToUse = fetch;
298+
if (overrideFetch) {
299+
const cleanFetch = getCleanFetch();
300+
fetchToUse = cleanFetch as typeof fetch ?? fetch;
301+
}
298302

299303
const response = await fetchToUse(
300304
this.trieve.baseUrl + "/api/chunk/generate",

clients/ts-sdk/src/functions/message/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export async function createMessageReader(
8383
let fetchToUse = fetch;
8484
if (overrideFetch) {
8585
const cleanFetch = getCleanFetch();
86-
fetchToUse = cleanFetch ?? fetch;
86+
fetchToUse = cleanFetch as typeof fetch ?? fetch;
8787
}
8888

8989
const response = await fetchToUse(this.trieve.baseUrl + "/api/message", {
@@ -136,7 +136,7 @@ export async function createMessageReaderWithQueryId(
136136
let fetchToUse = fetch;
137137
if (overrideFetch) {
138138
const cleanFetch = getCleanFetch();
139-
fetchToUse = cleanFetch ?? fetch;
139+
fetchToUse = cleanFetch as typeof fetch ?? fetch;
140140
}
141141

142142
const response = await fetchToUse(this.trieve.baseUrl + "/api/message", {

yarn.lock

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7740,16 +7740,7 @@ std-env@^3.8.0:
77407740
resolved "https://registry.npmjs.org/std-env/-/std-env-3.8.1.tgz"
77417741
integrity sha512-vj5lIj3Mwf9D79hBkltk5qmkFI+biIKWS2IBxEyEU3AX1tUf7AoL8nSazCOiiqQsGKIq01SClsKEzweu34uwvA==
77427742

7743-
"string-width-cjs@npm:string-width@^4.2.0":
7744-
version "4.2.3"
7745-
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
7746-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
7747-
dependencies:
7748-
emoji-regex "^8.0.0"
7749-
is-fullwidth-code-point "^3.0.0"
7750-
strip-ansi "^6.0.1"
7751-
7752-
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
7743+
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
77537744
version "4.2.3"
77547745
resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz"
77557746
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -7844,14 +7835,7 @@ stringify-entities@^4.0.0:
78447835
character-entities-html4 "^2.0.0"
78457836
character-entities-legacy "^3.0.0"
78467837

7847-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
7848-
version "6.0.1"
7849-
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
7850-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
7851-
dependencies:
7852-
ansi-regex "^5.0.1"
7853-
7854-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
7838+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
78557839
version "6.0.1"
78567840
resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz"
78577841
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -8747,16 +8731,7 @@ wordwrap@^1.0.0:
87478731
resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz"
87488732
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==
87498733

8750-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
8751-
version "7.0.0"
8752-
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
8753-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
8754-
dependencies:
8755-
ansi-styles "^4.0.0"
8756-
string-width "^4.1.0"
8757-
strip-ansi "^6.0.0"
8758-
8759-
wrap-ansi@^7.0.0:
8734+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
87608735
version "7.0.0"
87618736
resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz"
87628737
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==

0 commit comments

Comments
 (0)