@zimtsui/typechat 0.0.81 → 0.0.83
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/assets/verbatim/instruction.md +3 -3
- package/assets/verbatim/quotation.handlebars +1 -0
- package/build/assets.d.ts +1 -1
- package/build/assets.js +1 -1
- package/build/assets.js.map +1 -1
- package/build/media.d.ts +12 -8
- package/build/media.js +7 -4
- package/build/media.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/verbatim/codec/quotation.d.ts +1 -0
- package/build/verbatim/codec/quotation.js +10 -0
- package/build/verbatim/codec/quotation.js.map +1 -0
- package/build/verbatim/codec.d.ts +1 -1
- package/build/verbatim/codec.js +1 -1
- package/build/verbatim/codec.js.map +1 -1
- package/package.json +1 -1
- package/assets/verbatim/system.handlebars +0 -1
- package/build/verbatim/codec/system.d.ts +0 -1
- package/build/verbatim/codec/system.js +0 -10
- package/build/verbatim/codec/system.js.map +0 -1
|
@@ -39,8 +39,8 @@ The user message may contain the response of your request in the form of
|
|
|
39
39
|
|
|
40
40
|
Not all requests have a response.
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## Quotation
|
|
43
43
|
|
|
44
|
-
The user message may contain
|
|
44
|
+
The user message may contain verbatim quotation in the form of
|
|
45
45
|
|
|
46
|
-
<verbatim:
|
|
46
|
+
<verbatim:quotation mime-type="MIME_TYPE_OF_TEXT"><![CDATA[QUOTATION]]></verbatim:quotation>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<verbatim:quotation mime-type="{{this.mimeType}}"><![CDATA[{{{this.text}}}]]></verbatim:quotation>
|
package/build/assets.d.ts
CHANGED
package/build/assets.js
CHANGED
|
@@ -3,7 +3,7 @@ export default {
|
|
|
3
3
|
verbatim: {
|
|
4
4
|
instruction: loadtext(import.meta.resolve('../assets/verbatim/instruction.md')),
|
|
5
5
|
declarations: loadtext(import.meta.resolve('../assets/verbatim/declarations.handlebars')),
|
|
6
|
-
|
|
6
|
+
quotation: loadtext(import.meta.resolve('../assets/verbatim/quotation.handlebars')),
|
|
7
7
|
response: loadtext(import.meta.resolve('../assets/verbatim/response.handlebars')),
|
|
8
8
|
},
|
|
9
9
|
};
|
package/build/assets.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,eAAe;IACX,QAAQ,EAAE;QACN,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;QAC/E,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,4CAA4C,CAAC,CAAC;QACzF,
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,eAAe;IACX,QAAQ,EAAE;QACN,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;QAC/E,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,4CAA4C,CAAC,CAAC;QACzF,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,yCAAyC,CAAC,CAAC;QACnF,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,wCAAwC,CAAC,CAAC;KACpF;CACK,CAAC"}
|
package/build/media.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ export declare abstract class Media {
|
|
|
4
4
|
abstract mimeType: string;
|
|
5
5
|
}
|
|
6
6
|
export declare namespace Media {
|
|
7
|
-
type Options = Omit<Media, never>;
|
|
8
7
|
class Image extends Media {
|
|
9
8
|
mimeType: `image/${string}`;
|
|
10
9
|
base64: string;
|
|
@@ -12,7 +11,11 @@ export declare namespace Media {
|
|
|
12
11
|
constructor(options: Media.Image.Options);
|
|
13
12
|
}
|
|
14
13
|
namespace Image {
|
|
15
|
-
|
|
14
|
+
interface Options {
|
|
15
|
+
mimeType: `image/${string}`;
|
|
16
|
+
base64: string;
|
|
17
|
+
resolution: Media.Image.Resolution;
|
|
18
|
+
}
|
|
16
19
|
const enum Resolution {
|
|
17
20
|
AUTO = 0,
|
|
18
21
|
LOW = 1,
|
|
@@ -21,20 +24,21 @@ export declare namespace Media {
|
|
|
21
24
|
}
|
|
22
25
|
}
|
|
23
26
|
class Pdf extends Media {
|
|
24
|
-
mimeType: `application/pdf`;
|
|
25
27
|
base64: string;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
namespace Pdf {
|
|
29
|
-
type Options = Omit<Media.Pdf, never>;
|
|
28
|
+
mimeType: string;
|
|
29
|
+
constructor(base64: string);
|
|
30
30
|
}
|
|
31
31
|
class Text extends Media {
|
|
32
32
|
mimeType: `text/${string}`;
|
|
33
33
|
text: string;
|
|
34
34
|
constructor(options: Media.Text.Options);
|
|
35
|
+
quote(): string;
|
|
35
36
|
}
|
|
36
37
|
namespace Text {
|
|
37
|
-
|
|
38
|
+
interface Options {
|
|
39
|
+
mimeType: `text/${string}`;
|
|
40
|
+
text: string;
|
|
41
|
+
}
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
export {};
|
package/build/media.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as VerbatimCodec from "./verbatim/codec.js";
|
|
1
2
|
const NOMINAL = Symbol();
|
|
2
3
|
export class Media {
|
|
3
4
|
}
|
|
@@ -15,12 +16,11 @@ export class Media {
|
|
|
15
16
|
}
|
|
16
17
|
Media.Image = Image;
|
|
17
18
|
class Pdf extends Media {
|
|
18
|
-
mimeType;
|
|
19
19
|
base64;
|
|
20
|
-
|
|
20
|
+
mimeType = 'application/pdf';
|
|
21
|
+
constructor(base64) {
|
|
21
22
|
super();
|
|
22
|
-
this.
|
|
23
|
-
this.base64 = options.base64;
|
|
23
|
+
this.base64 = base64;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
Media.Pdf = Pdf;
|
|
@@ -32,6 +32,9 @@ export class Media {
|
|
|
32
32
|
this.mimeType = options.mimeType;
|
|
33
33
|
this.text = options.text;
|
|
34
34
|
}
|
|
35
|
+
quote() {
|
|
36
|
+
return VerbatimCodec.Quotation.encode(this.mimeType, this.text);
|
|
37
|
+
}
|
|
35
38
|
}
|
|
36
39
|
Media.Text = Text;
|
|
37
40
|
})(Media || (Media = {}));
|
package/build/media.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media.js","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC;AAGzB,MAAM,OAAgB,KAAK;CAG1B;AAED,WAAiB,KAAK;
|
|
1
|
+
{"version":3,"file":"media.js","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,qBAAqB,CAAC;AAErD,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC;AAGzB,MAAM,OAAgB,KAAK;CAG1B;AAED,WAAiB,KAAK;IAClB,MAAa,KAAM,SAAQ,KAAK;QACZ,QAAQ,CAAoB;QACrC,MAAM,CAAS;QACf,UAAU,CAAyB;QAC1C,YAAmB,OAA4B;YAC3C,KAAK,EAAE,CAAC;YACR,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;YACjC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;YAC7B,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;QACzC,CAAC;KACJ;IAVY,WAAK,QAUjB,CAAA;IAeD,MAAa,GAAI,SAAQ,KAAK;QAEA;QADV,QAAQ,GAAG,iBAA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