@letta-ai/letta-code 0.1.14 → 0.1.17

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.1.14",
3
+ "version": "0.1.17",
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": {
@@ -22,8 +22,9 @@
22
22
  "access": "public"
23
23
  },
24
24
  "dependencies": {
25
- "@letta-ai/letta-client": "1.0.0-alpha.10",
26
- "ink-link": "^5.0.0"
25
+ "@letta-ai/letta-client": "1.0.0-alpha.14",
26
+ "ink-link": "^5.0.0",
27
+ "open": "^10.2.0"
27
28
  },
28
29
  "optionalDependencies": {
29
30
  "@vscode/ripgrep": "^1.17.0"
@@ -31,19 +32,23 @@
31
32
  "devDependencies": {
32
33
  "@types/bun": "latest",
33
34
  "@types/diff": "^8.0.0",
34
- "typescript": "^5.0.0",
35
- "husky": "9.1.7",
36
- "lint-staged": "16.2.4",
35
+ "@types/picomatch": "^4.0.2",
37
36
  "diff": "^8.0.2",
37
+ "husky": "9.1.7",
38
38
  "ink": "^5.0.0",
39
39
  "ink-spinner": "^5.0.0",
40
40
  "ink-text-input": "^5.0.0",
41
+ "lint-staged": "16.2.4",
41
42
  "minimatch": "^10.0.3",
42
- "react": "18.2.0"
43
+ "picomatch": "^2.3.1",
44
+ "react": "18.2.0",
45
+ "typescript": "^5.0.0"
43
46
  },
44
47
  "scripts": {
45
48
  "lint": "bunx --bun @biomejs/biome@2.2.5 check src",
46
49
  "fix": "bunx --bun @biomejs/biome@2.2.5 check --write src",
50
+ "typecheck": "tsc --noEmit",
51
+ "check": "bun run scripts/check.js",
47
52
  "dev": "bun --loader:.md=text --loader:.mdx=text --loader:.txt=text run src/index.ts",
48
53
  "build": "bun run build.js",
49
54
  "prepare": "bun run build",
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env bun
2
+ // Script to run linting and type checking with helpful error messages
3
+
4
+ import { $ } from "bun";
5
+
6
+ console.log("🔍 Running lint and type checks...\n");
7
+
8
+ let failed = false;
9
+
10
+ // Run lint
11
+ console.log("📝 Running Biome linter...");
12
+ try {
13
+ await $`bun run lint`;
14
+ console.log("✅ Linting passed\n");
15
+ } catch (error) {
16
+ console.error("❌ Linting failed\n");
17
+ console.error("To fix automatically, run:");
18
+ console.error(" bun run fix\n");
19
+ failed = true;
20
+ }
21
+
22
+ // Run typecheck
23
+ console.log("🔎 Running TypeScript type checker...");
24
+ try {
25
+ await $`bun run typecheck`;
26
+ console.log("✅ Type checking passed\n");
27
+ } catch (error) {
28
+ console.error("❌ Type checking failed\n");
29
+ console.error("Fix the type errors shown above, then run:");
30
+ console.error(" bun run typecheck\n");
31
+ failed = true;
32
+ }
33
+
34
+ if (failed) {
35
+ console.error("❌ Checks failed. Please fix the errors above.");
36
+ console.error("\nQuick commands:");
37
+ console.error(" bun run fix # Auto-fix linting issues");
38
+ console.error(" bun run typecheck # Check types only");
39
+ console.error(" bun run check # Run both checks");
40
+ process.exit(1);
41
+ }
42
+
43
+ console.log("✅ All checks passed!");
@@ -46,7 +46,7 @@ function TextInput({ value: originalValue, placeholder = '', focus = true, mask,
46
46
  return;
47
47
  }
48
48
  // Treat Escape as a control key (don't insert into value)
49
- if (key.escape || key.upArrow || key.downArrow || (key.ctrl && input === 'c') || key.tab || (key.shift && key.tab)) {
49
+ if (key.escape || (key.ctrl && input === 'c') || key.tab || (key.shift && key.tab)) {
50
50
  return;
51
51
  }
52
52
  if (key.return) {
@@ -68,6 +68,11 @@ function TextInput({ value: originalValue, placeholder = '', focus = true, mask,
68
68
  nextCursorOffset++;
69
69
  }
70
70
  }
71
+ else if (key.upArrow || key.downArrow) {
72
+ // Handle wrapped line navigation - don't handle here, let parent decide
73
+ // Parent will check cursor position to determine if at boundary
74
+ return;
75
+ }
71
76
  else if (key.backspace || key.delete) {
72
77
  if (cursorOffset > 0) {
73
78
  nextValue = originalValue.slice(0, cursorOffset - 1) + originalValue.slice(cursorOffset, originalValue.length);