@letta-ai/letta-code 0.19.9 → 0.20.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.19.9",
3
+ "version": "0.20.0",
4
4
  "description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,7 +33,7 @@
33
33
  "access": "public"
34
34
  },
35
35
  "dependencies": {
36
- "@letta-ai/letta-client": "1.8.0",
36
+ "@letta-ai/letta-client": "1.10.1",
37
37
  "glob": "^13.0.0",
38
38
  "highlight.js": "^11.11.1",
39
39
  "ink-link": "^5.0.0",
@@ -3,10 +3,9 @@
3
3
  import { existsSync, readdirSync, readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
5
5
  import { getClient } from "../../../../agent/client";
6
+ import { estimateTokens } from "../../../../cli/helpers/format";
6
7
  import { settingsManager } from "../../../../settings-manager";
7
8
 
8
- const BYTES_PER_TOKEN = 4;
9
-
10
9
  type FileEstimate = {
11
10
  path: string;
12
11
  tokens: number;
@@ -46,10 +45,6 @@ function parseArgs(argv: string[]): ParsedArgs {
46
45
  return parsed;
47
46
  }
48
47
 
49
- function estimateTokens(text: string): number {
50
- return Math.ceil(Buffer.byteLength(text, "utf8") / BYTES_PER_TOKEN);
51
- }
52
-
53
48
  function normalizePath(value: string): string {
54
49
  return value.replaceAll("\\", "/");
55
50
  }