clanka 0.22.1 → 0.22.2
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/README.md +1 -1
- package/dist/Compaction.js +1 -1
- package/dist/Compaction.test.js +5 -5
- package/dist/bin/cli.mjs +2 -2
- package/dist/bin/cli.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Compaction.test.ts +6 -6
- package/src/Compaction.ts +1 -1
package/package.json
CHANGED
package/src/Compaction.test.ts
CHANGED
|
@@ -185,7 +185,7 @@ describe("Compaction.estimateTokens", () => {
|
|
|
185
185
|
|
|
186
186
|
describe("Compaction.CompactionConfig", () => {
|
|
187
187
|
it.effect(
|
|
188
|
-
"defaults to a 236k window, a 16k reserve and a
|
|
188
|
+
"defaults to a 236k window, a 16k reserve and a 200k threshold",
|
|
189
189
|
() =>
|
|
190
190
|
Effect.gen(function* () {
|
|
191
191
|
const config = yield* Compaction.CompactionConfig
|
|
@@ -193,7 +193,7 @@ describe("Compaction.CompactionConfig", () => {
|
|
|
193
193
|
enabled: true,
|
|
194
194
|
contextWindow: 236_000,
|
|
195
195
|
reserveTokens: 16_000,
|
|
196
|
-
thresholdTokens:
|
|
196
|
+
thresholdTokens: 200_000,
|
|
197
197
|
keepRecentTokens: 20_000,
|
|
198
198
|
})
|
|
199
199
|
assert.deepStrictEqual(config, Compaction.defaultConfig)
|
|
@@ -210,9 +210,9 @@ describe("Compaction.shouldCompact", () => {
|
|
|
210
210
|
const small = Prompt.fromMessages([user("hi")])
|
|
211
211
|
|
|
212
212
|
for (const [tokens, expected] of [
|
|
213
|
-
[
|
|
214
|
-
[
|
|
215
|
-
[
|
|
213
|
+
[199_999, false],
|
|
214
|
+
[200_000, false],
|
|
215
|
+
[200_001, true],
|
|
216
216
|
] as const) {
|
|
217
217
|
it(`returns ${expected} with default config and ${tokens} reported tokens`, () => {
|
|
218
218
|
assert.strictEqual(
|
|
@@ -826,4 +826,4 @@ describe("Compaction.rewrite", () => {
|
|
|
826
826
|
)
|
|
827
827
|
}),
|
|
828
828
|
)
|
|
829
|
-
})
|
|
829
|
+
})
|