@thegitai/cli 1.0.0-preview.3 → 1.0.0-preview.31

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.
Files changed (58) hide show
  1. package/README.md +39 -6
  2. package/dist/bin/ai.js +142 -383
  3. package/dist/src/agent-mode.js +1 -6
  4. package/dist/src/api/auth.js +6 -4
  5. package/dist/src/api/browser-login.js +152 -37
  6. package/dist/src/api/chat.js +258 -38
  7. package/dist/src/api/contracts.js +55 -1
  8. package/dist/src/api/default-host.js +1 -0
  9. package/dist/src/api/http.js +69 -7
  10. package/dist/src/api/models.js +19 -10
  11. package/dist/src/background-jobs.js +2 -2
  12. package/dist/src/cli-args.js +19 -5
  13. package/dist/src/core/clipboard.js +7 -13
  14. package/dist/src/core/image-limits.js +56 -0
  15. package/dist/src/core/image-path-extractor.js +70 -3
  16. package/dist/src/core/session-image-store.js +199 -0
  17. package/dist/src/executor.js +25 -3
  18. package/dist/src/help-text.js +67 -18
  19. package/dist/src/permissions.js +243 -0
  20. package/dist/src/session-safety.js +0 -12
  21. package/dist/src/session-store.js +121 -20
  22. package/dist/src/session.js +14 -3
  23. package/dist/src/signin.js +58 -0
  24. package/dist/src/tool-executor.js +11 -46
  25. package/dist/src/tools/delete-file.js +15 -3
  26. package/dist/src/tools/index.js +13 -10
  27. package/dist/src/tools/patch-file.js +12 -26
  28. package/dist/src/tools/read-image-file.js +85 -0
  29. package/dist/src/tools/replace-document-text.js +28 -18
  30. package/dist/src/tools/restore-checkpoint.js +0 -1
  31. package/dist/src/tools/run-command.js +14 -71
  32. package/dist/src/tools/run-node-script.js +12 -81
  33. package/dist/src/tools/save-generated-image.js +120 -0
  34. package/dist/src/tools/str-replace.js +12 -26
  35. package/dist/src/tools/undo-edit.js +1 -6
  36. package/dist/src/tools/write-file.js +67 -11
  37. package/dist/src/turn-failure-marker.js +11 -0
  38. package/dist/src/ui/prompt-history-store.js +1 -1
  39. package/dist/src/ui/repl.js +649 -164
  40. package/dist/src/ui/tui/bridge.js +10 -0
  41. package/dist/src/ui/tui/build-frame.js +453 -115
  42. package/dist/src/ui/tui/markdown-render.js +81 -73
  43. package/dist/src/ui/tui/shell-input.js +206 -63
  44. package/dist/src/ui/tui/terminal-theme.js +28 -0
  45. package/dist/src/ui/tui/terminal-title.js +3 -0
  46. package/dist/src/ui/tui/terminal-writes.js +48 -0
  47. package/dist/src/ui/tui/text.js +158 -4
  48. package/dist/src/ui/tui/user-input.js +568 -0
  49. package/dist/src/utils.js +9 -0
  50. package/package.json +29 -6
  51. package/dist/src/markdown-renderer.js +0 -112
  52. package/dist/src/project-index.js +0 -221
  53. package/dist/src/tools/code-intel.js +0 -472
  54. package/dist/src/tools/find-symbol.js +0 -70
  55. package/dist/src/tools/hover-symbol.js +0 -95
  56. package/dist/src/tools/list-symbols.js +0 -55
  57. package/dist/src/tools/search-code.js +0 -37
  58. package/dist/src/tools/signature-help.js +0 -118
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
- # TheGitAI
1
+ # TheGitAI — AI coding agent for your terminal
2
2
 
3
- Interactive terminal coding agent. Talk to your repo in plain English it reads
4
- your code, makes edits, runs the commands a task needs, and keeps long-running
5
- processes going while you work, all with your approval.
3
+ TheGitAI is an AI coding agent for your terminal. It reads and searches your repository,
4
+ writes and edits files, runs commands, and builds features with you.
5
+
6
+ Talk to your repo in plain English. TheGitAI can keep long-running processes
7
+ going while you work, all with your approval.
6
8
 
7
9
  ## Install
8
10
 
@@ -15,9 +17,9 @@ Requires Node.js 24 or newer.
15
17
  ## Usage
16
18
 
17
19
  ```text
18
- ai start an interactive session in the current repo
20
+ ai sign in if needed, then start a session in the current repo
19
21
  ai "<request>" start a session with <request> as the first message
20
- ai login sign in via your browser (--no-browser for SSH/headless)
22
+ ai login the same as `ai`; kept for muscle memory
21
23
  ai whoami show the signed-in account
22
24
  ai --usage show account usage and reset times
23
25
  ai logout sign out
@@ -26,6 +28,37 @@ ai --version print the version and exit
26
28
 
27
29
  Run `ai --help` for sessions, modes, keys, and chat commands.
28
30
 
31
+ Coding sessions require an interactive terminal on stdin and stdout. Piped
32
+ one-shot prompts are not supported. Saved history is local to the repo and can
33
+ always be viewed or resumed from that computer. Continuing it through the
34
+ service requires the TheGitAI account used for that session. Local sessions can
35
+ also be listed while signed out or offline.
36
+
37
+ Signing in opens your browser. The same screen also prints a URL you can open on
38
+ any other device and a box for an authorization code, so SSH and headless
39
+ machines need no separate command: open the URL wherever you have a browser,
40
+ choose "On another computer" on that page, and paste the code it shows.
41
+
42
+ CLI login tokens use a rolling 48-hour inactivity timeout. If one expires during
43
+ any server request, the CLI removes the expired credential and signs you in
44
+ again on the next run.
45
+
46
+ ## Structured questions
47
+
48
+ The agent can pause its current turn to ask up to four related questions in one
49
+ form. Use **↑ / ↓**, the displayed option number, or **Enter** to choose, and
50
+ **← / →** to move between questions. **Something else / add details** is the
51
+ numbered final option; focus it and type, paste, or press **Enter** to add a
52
+ single-line note. On single-select questions it is mutually exclusive with the
53
+ listed choices, and **↑ / ↓** leaves its editor when the note is empty.
54
+ Multi-select questions toggle choices. The last question has an explicit
55
+ **Submit answers** row. **Esc** closes an open note first and otherwise cancels
56
+ the form; **Ctrl+C** cancels the whole turn.
57
+
58
+ Answers return to the same turn, and completed question/answer records remain
59
+ readable when the session is resumed. Default, Auto-Accept, and Plan modes all
60
+ support the form; Auto-Accept does not choose answers for you.
61
+
29
62
  ## Visible to-do list
30
63
 
31
64
  For larger multi-step tasks, the agent keeps a compact to-do list on screen so