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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "clanka",
3
3
  "type": "module",
4
- "version": "0.22.1",
4
+ "version": "0.22.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -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 160k threshold",
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: 160_000,
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
- [159_999, false],
214
- [160_000, false],
215
- [160_001, true],
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
+ })
package/src/Compaction.ts CHANGED
@@ -63,7 +63,7 @@ export const defaultConfig: CompactionConfigService = {
63
63
  enabled: true,
64
64
  contextWindow: 236_000,
65
65
  reserveTokens: 16_000,
66
- thresholdTokens: 160_000,
66
+ thresholdTokens: 200_000,
67
67
  keepRecentTokens: 20_000,
68
68
  }
69
69