@tecet/ollm 0.1.4 → 0.1.5

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 (86) hide show
  1. package/dist/cli.js +20 -14
  2. package/dist/cli.js.map +3 -3
  3. package/dist/services/documentService.d.ts.map +1 -1
  4. package/dist/services/documentService.js +12 -2
  5. package/dist/services/documentService.js.map +1 -1
  6. package/dist/ui/components/docs/DocsPanel.d.ts.map +1 -1
  7. package/dist/ui/components/docs/DocsPanel.js +1 -1
  8. package/dist/ui/components/docs/DocsPanel.js.map +1 -1
  9. package/dist/ui/components/launch/VersionBanner.js +1 -1
  10. package/dist/ui/components/launch/VersionBanner.js.map +1 -1
  11. package/dist/ui/components/layout/KeybindsLegend.d.ts.map +1 -1
  12. package/dist/ui/components/layout/KeybindsLegend.js +1 -1
  13. package/dist/ui/components/layout/KeybindsLegend.js.map +1 -1
  14. package/dist/ui/components/tabs/BugReportTab.js +1 -1
  15. package/dist/ui/components/tabs/BugReportTab.js.map +1 -1
  16. package/dist/ui/services/docsService.d.ts +12 -27
  17. package/dist/ui/services/docsService.d.ts.map +1 -1
  18. package/dist/ui/services/docsService.js +40 -67
  19. package/dist/ui/services/docsService.js.map +1 -1
  20. package/docs/README.md +3 -410
  21. package/package.json +10 -7
  22. package/scripts/copy-docs-to-user.cjs +34 -0
  23. package/docs/Context/CheckpointFlowDiagram.md +0 -673
  24. package/docs/Context/ContextArchitecture.md +0 -898
  25. package/docs/Context/ContextCompression.md +0 -1102
  26. package/docs/Context/ContextManagment.md +0 -750
  27. package/docs/Context/Index.md +0 -209
  28. package/docs/Context/README.md +0 -390
  29. package/docs/DevelopmentRoadmap/Index.md +0 -238
  30. package/docs/DevelopmentRoadmap/OLLM-CLI_Releases.md +0 -419
  31. package/docs/DevelopmentRoadmap/PlanedFeatures.md +0 -448
  32. package/docs/DevelopmentRoadmap/README.md +0 -174
  33. package/docs/DevelopmentRoadmap/Roadmap.md +0 -572
  34. package/docs/DevelopmentRoadmap/RoadmapVisual.md +0 -372
  35. package/docs/Hooks/Architecture.md +0 -885
  36. package/docs/Hooks/Index.md +0 -244
  37. package/docs/Hooks/KeyboardShortcuts.md +0 -248
  38. package/docs/Hooks/Protocol.md +0 -817
  39. package/docs/Hooks/README.md +0 -403
  40. package/docs/Hooks/UserGuide.md +0 -1483
  41. package/docs/Hooks/VisualGuide.md +0 -598
  42. package/docs/Index.md +0 -506
  43. package/docs/Installation.md +0 -586
  44. package/docs/Introduction.md +0 -367
  45. package/docs/LLM Models/Index.md +0 -239
  46. package/docs/LLM Models/LLM_GettingStarted.md +0 -748
  47. package/docs/LLM Models/LLM_Index.md +0 -701
  48. package/docs/LLM Models/LLM_MemorySystem.md +0 -337
  49. package/docs/LLM Models/LLM_ModelCompatibility.md +0 -499
  50. package/docs/LLM Models/LLM_ModelsArchitecture.md +0 -933
  51. package/docs/LLM Models/LLM_ModelsCommands.md +0 -839
  52. package/docs/LLM Models/LLM_ModelsConfiguration.md +0 -1094
  53. package/docs/LLM Models/LLM_ModelsList.md +0 -1071
  54. package/docs/LLM Models/LLM_ModelsList.md.backup +0 -400
  55. package/docs/LLM Models/README.md +0 -355
  56. package/docs/MCP/MCP_Architecture.md +0 -1086
  57. package/docs/MCP/MCP_Commands.md +0 -1111
  58. package/docs/MCP/MCP_GettingStarted.md +0 -590
  59. package/docs/MCP/MCP_Index.md +0 -524
  60. package/docs/MCP/MCP_Integration.md +0 -866
  61. package/docs/MCP/MCP_Marketplace.md +0 -160
  62. package/docs/MCP/README.md +0 -415
  63. package/docs/Prompts System/Architecture.md +0 -760
  64. package/docs/Prompts System/Index.md +0 -223
  65. package/docs/Prompts System/PromptsRouting.md +0 -1047
  66. package/docs/Prompts System/PromptsTemplates.md +0 -1102
  67. package/docs/Prompts System/README.md +0 -389
  68. package/docs/Prompts System/SystemPrompts.md +0 -856
  69. package/docs/Quickstart.md +0 -535
  70. package/docs/Tools/Architecture.md +0 -884
  71. package/docs/Tools/GettingStarted.md +0 -624
  72. package/docs/Tools/Index.md +0 -216
  73. package/docs/Tools/ManifestReference.md +0 -141
  74. package/docs/Tools/README.md +0 -440
  75. package/docs/Tools/UserGuide.md +0 -773
  76. package/docs/Troubleshooting.md +0 -1265
  77. package/docs/UI&Settings/Architecture.md +0 -729
  78. package/docs/UI&Settings/ColorASCII.md +0 -34
  79. package/docs/UI&Settings/Commands.md +0 -755
  80. package/docs/UI&Settings/Configuration.md +0 -872
  81. package/docs/UI&Settings/Index.md +0 -293
  82. package/docs/UI&Settings/Keybinds.md +0 -372
  83. package/docs/UI&Settings/README.md +0 -278
  84. package/docs/UI&Settings/Terminal.md +0 -637
  85. package/docs/UI&Settings/Themes.md +0 -604
  86. package/docs/UI&Settings/UIGuide.md +0 -550
@@ -1,637 +0,0 @@
1
- # Terminal Guide
2
-
3
- **Last Updated:** January 26, 2026
4
-
5
- Complete guide to the integrated terminal system in OLLM CLI, including architecture, usage, and integration with the shell tool.
6
-
7
- ---
8
-
9
- ## Overview
10
-
11
- OLLM CLI includes an integrated terminal system that provides two independent terminal sessions within the UI. The terminal uses PTY (pseudo-terminal) for shell process management and xterm.js headless for ANSI parsing and rendering.
12
-
13
- ---
14
-
15
- ## Terminal Sessions
16
-
17
- ### Dual Terminal Design
18
-
19
- OLLM CLI provides two independent terminal sessions:
20
-
21
- 1. **Terminal 1** - Primary terminal (implementation TBD)
22
- 2. **Terminal 2** - Secondary terminal (fully implemented)
23
-
24
- **Features:**
25
-
26
- - Each terminal runs in its own PTY process
27
- - Independent shell sessions
28
- - Separate scrollback buffers
29
- - Can be focused and controlled independently
30
-
31
- ---
32
-
33
- ## Accessing the Terminal
34
-
35
- ### Opening the Terminal
36
-
37
- **Method 1: Side Panel Tab**
38
-
39
- 1. Press `Ctrl+P` to open side panel (if closed)
40
- 2. Press `Ctrl+8` to switch to Terminal tab
41
- 3. Terminal displays in the side panel
42
-
43
- **Method 2: Direct Navigation**
44
-
45
- - Press `Ctrl+8` directly to open side panel and switch to terminal
46
-
47
- ---
48
-
49
- ### Terminal Layout
50
-
51
- ```
52
- ┌─ Terminal ───────────────────────────────┐
53
- │ $ ls -la │
54
- │ total 48 │
55
- │ drwxr-xr-x 12 user staff 384 Jan 26 │
56
- │ drwxr-xr-x 5 user staff 160 Jan 25 │
57
- │ -rw-r--r-- 1 user staff 1234 Jan 26 │
58
- │ │
59
- │ $ _ │
60
- │ │
61
- │ [Ctrl+L: Clear | Ctrl+C: Interrupt] │
62
- └───────────────────────────────────────────┘
63
- ```
64
-
65
- ---
66
-
67
- ## Terminal Features
68
-
69
- ### Shell Integration
70
-
71
- **Platform-Specific Shells:**
72
-
73
- - **Windows:** PowerShell
74
- - **macOS:** bash or zsh
75
- - **Linux:** bash
76
-
77
- **Shell Configuration:**
78
-
79
- - PowerShell: Prediction disabled for cleaner output
80
- - Bash: Standard configuration
81
- - Environment variables inherited from parent process
82
-
83
- ---
84
-
85
- ### ANSI Rendering
86
-
87
- The terminal supports full ANSI escape sequences:
88
-
89
- **Text Formatting:**
90
-
91
- - Bold, italic, underline
92
- - Dim, inverse
93
- - Strikethrough
94
-
95
- **Colors:**
96
-
97
- - 16 basic colors
98
- - 256-color palette
99
- - True color (24-bit RGB)
100
-
101
- **Cursor Control:**
102
-
103
- - Cursor positioning
104
- - Cursor visibility
105
- - Cursor styles
106
-
107
- ---
108
-
109
- ### Scrollback Buffer
110
-
111
- **Configuration:**
112
-
113
- - Default: 1000 lines
114
- - Prevents unbounded memory growth
115
- - Older lines automatically removed
116
-
117
- **Scrolling:**
118
-
119
- - `Ctrl+Shift+Up` - Scroll up
120
- - `Ctrl+Shift+Down` - Scroll down
121
- - Auto-scroll to bottom on new output
122
-
123
- ---
124
-
125
- ## Terminal Commands
126
-
127
- ### Sending Commands
128
-
129
- **Method 1: Type in Terminal**
130
-
131
- 1. Focus the terminal (click or navigate)
132
- 2. Type your command
133
- 3. Press `Return` to execute
134
-
135
- **Method 2: Programmatic**
136
-
137
- ```typescript
138
- // Via Terminal Context
139
- const { sendCommand } = useTerminal();
140
- sendCommand('ls -la');
141
- ```
142
-
143
- ---
144
-
145
- ### Command Examples
146
-
147
- **File Operations:**
148
-
149
- ```bash
150
- ls -la # List files
151
- cd src # Change directory
152
- cat file.txt # View file contents
153
- ```
154
-
155
- **Git Operations:**
156
-
157
- ```bash
158
- git status # Check git status
159
- git diff # View changes
160
- git log --oneline # View commit history
161
- ```
162
-
163
- **System Information:**
164
-
165
- ```bash
166
- # Windows (PowerShell)
167
- Get-Process # List processes
168
- Get-Service # List services
169
-
170
- # macOS/Linux (bash)
171
- ps aux # List processes
172
- df -h # Disk usage
173
- ```
174
-
175
- ---
176
-
177
- ## Terminal Controls
178
-
179
- ### Keyboard Shortcuts
180
-
181
- **Scrolling:**
182
-
183
- - `Ctrl+Shift+Up` - Scroll up one line
184
- - `Ctrl+Shift+Down` - Scroll down one line
185
- - `Page Up` - Scroll up one page
186
- - `Page Down` - Scroll down one page
187
-
188
- **Control:**
189
-
190
- - `Ctrl+C` - Interrupt current process
191
- - `Ctrl+L` - Clear terminal
192
- - `Ctrl+D` - Send EOF (exit shell)
193
-
194
- **Navigation:**
195
-
196
- - `Up` / `Down` - Command history
197
- - `Ctrl+R` - Reverse search history
198
- - `Tab` - Auto-complete
199
-
200
- ---
201
-
202
- ### Terminal Actions
203
-
204
- **Clear Terminal:**
205
-
206
- ```bash
207
- /terminal clear
208
- # or
209
- Ctrl+L
210
- ```
211
-
212
- **Interrupt Process:**
213
-
214
- ```bash
215
- Ctrl+C
216
- ```
217
-
218
- **Restart Terminal:**
219
-
220
- ```bash
221
- /terminal restart
222
- ```
223
-
224
- ---
225
-
226
- ## Shell Tool Integration
227
-
228
- ### Automatic Execution
229
-
230
- When the AI uses the shell tool, commands are automatically executed in the terminal:
231
-
232
- **Flow:**
233
-
234
- 1. AI decides to use shell tool
235
- 2. Command sent to terminal
236
- 3. Terminal executes command
237
- 4. Output displayed in terminal
238
- 5. Result returned to AI
239
-
240
- **Example:**
241
-
242
- ```
243
- User: List all TypeScript files
244
- Assistant: I'll search for TypeScript files.
245
- [Tool: shell]
246
- Command: find . -name "*.ts"
247
- Output:
248
- ./src/index.ts
249
- ./src/utils.ts
250
- ./tests/app.test.ts
251
- ```
252
-
253
- ---
254
-
255
- ### Manual Execution
256
-
257
- You can also execute commands manually in the terminal:
258
-
259
- **Method 1: Direct Input**
260
-
261
- 1. Focus terminal
262
- 2. Type command
263
- 3. Press `Return`
264
-
265
- **Method 2: Via Chat**
266
-
267
- ```
268
- User: Run "npm test" in the terminal
269
- Assistant: I'll execute that command.
270
- [Tool: shell]
271
- Command: npm test
272
- ```
273
-
274
- ---
275
-
276
- ## Terminal Context API
277
-
278
- ### Using Terminal Context
279
-
280
- **Import:**
281
-
282
- ```typescript
283
- import { useTerminal } from '../contexts/TerminalContext';
284
- ```
285
-
286
- **Access:**
287
-
288
- ```typescript
289
- const {
290
- output, // Structured terminal output
291
- isRunning, // PTY process status
292
- sendCommand, // Send command + Enter
293
- sendRawInput, // Send raw characters
294
- clear, // Clear terminal
295
- interrupt, // Send Ctrl+C
296
- resize, // Resize terminal
297
- } = useTerminal();
298
- ```
299
-
300
- ---
301
-
302
- ### Methods
303
-
304
- **sendCommand(command: string)**
305
-
306
- - Sends command with carriage return
307
- - Use for complete commands
308
- - Example: `sendCommand('ls -la')`
309
-
310
- **sendRawInput(char: string)**
311
-
312
- - Sends raw characters without modification
313
- - Use for interactive input
314
- - Example: `sendRawInput('y')` for yes/no prompts
315
-
316
- **clear()**
317
-
318
- - Clears xterm buffer
319
- - Sends `clear` command to shell
320
- - Resets output state
321
-
322
- **interrupt()**
323
-
324
- - Sends Ctrl+C to PTY
325
- - Interrupts running process
326
- - Does not clear terminal
327
-
328
- **resize(cols: number, rows: number)**
329
-
330
- - Resizes both xterm and PTY
331
- - Minimum: 1 col × 1 row
332
- - Silently fails on error
333
-
334
- ---
335
-
336
- ## Terminal Output
337
-
338
- ### Output Structure
339
-
340
- Terminal output is structured as ANSI tokens:
341
-
342
- ```typescript
343
- interface AnsiToken {
344
- text: string;
345
- bold: boolean;
346
- italic: boolean;
347
- underline: boolean;
348
- dim: boolean;
349
- inverse: boolean;
350
- fg: string; // Hex color
351
- bg: string; // Hex color
352
- }
353
-
354
- type AnsiLine = AnsiToken[];
355
- type AnsiOutput = AnsiLine[];
356
- ```
357
-
358
- ---
359
-
360
- ### Rendering
361
-
362
- **Text Formatting:**
363
-
364
- ```typescript
365
- <Text
366
- color={token.fg}
367
- backgroundColor={token.bg}
368
- bold={token.bold}
369
- italic={token.italic}
370
- underline={token.underline}
371
- dimColor={token.dim}
372
- inverse={token.inverse}
373
- >
374
- {token.text}
375
- </Text>
376
- ```
377
-
378
- **Color Support:**
379
-
380
- - Default colors (terminal defaults)
381
- - 256-color ANSI palette
382
- - True color (24-bit RGB)
383
-
384
- ---
385
-
386
- ## Advanced Usage
387
-
388
- ### Command History
389
-
390
- Command history is managed by the shell:
391
-
392
- **Bash:**
393
-
394
- - Stored in `~/.bash_history`
395
- - Navigate with `Up` / `Down` arrows
396
- - Search with `Ctrl+R`
397
-
398
- **PowerShell:**
399
-
400
- - Managed by PSReadLine module
401
- - Navigate with `Up` / `Down` arrows
402
- - Search with `Ctrl+R`
403
-
404
- ---
405
-
406
- ### Interactive Programs
407
-
408
- The terminal supports interactive programs:
409
-
410
- **Examples:**
411
-
412
- - `vim` / `nano` - Text editors
413
- - `htop` / `top` - Process monitors
414
- - `less` / `more` - Pagers
415
- - Interactive prompts (y/n)
416
-
417
- **Note:** Some programs may not render correctly due to terminal size constraints.
418
-
419
- ---
420
-
421
- ### Long-Running Commands
422
-
423
- **Behavior:**
424
-
425
- - Commands run in background
426
- - Output streams in real-time
427
- - Can be interrupted with `Ctrl+C`
428
-
429
- **Examples:**
430
-
431
- ```bash
432
- # Development server
433
- npm run dev
434
-
435
- # Watch mode
436
- npm run test -- --watch
437
-
438
- # Long-running script
439
- ./deploy.sh
440
- ```
441
-
442
- ---
443
-
444
- ## Troubleshooting
445
-
446
- ### Terminal Not Starting
447
-
448
- **Symptoms:**
449
-
450
- - Terminal tab is empty
451
- - No shell prompt appears
452
-
453
- **Solutions:**
454
-
455
- 1. Check shell executable exists
456
- 2. Verify PTY spawn permissions
457
- 3. Check environment variables
458
- 4. Restart OLLM CLI
459
-
460
- **Verify:**
461
-
462
- ```bash
463
- # Check shell path
464
- which bash # macOS/Linux
465
- where powershell # Windows
466
- ```
467
-
468
- ---
469
-
470
- ### Output Not Displaying
471
-
472
- **Symptoms:**
473
-
474
- - Commands execute but no output
475
- - Partial output displayed
476
-
477
- **Solutions:**
478
-
479
- 1. Check xterm.js buffer state
480
- 2. Verify ANSI parsing
481
- 3. Clear terminal and retry
482
- 4. Check terminal size
483
-
484
- **Verify:**
485
-
486
- ```bash
487
- # Test with simple command
488
- echo "Hello World"
489
-
490
- # Check terminal size
491
- echo $COLUMNS $LINES # bash
492
- $Host.UI.RawUI.WindowSize # PowerShell
493
- ```
494
-
495
- ---
496
-
497
- ### Commands Not Working
498
-
499
- **Symptoms:**
500
-
501
- - Commands don't execute
502
- - No response to input
503
-
504
- **Solutions:**
505
-
506
- 1. Check terminal focus
507
- 2. Verify PTY process running
508
- 3. Check for hung process
509
- 4. Restart terminal
510
-
511
- **Verify:**
512
-
513
- ```bash
514
- # Check if shell is responsive
515
- echo "test"
516
-
517
- # If hung, interrupt
518
- Ctrl+C
519
-
520
- # If still hung, restart terminal
521
- /terminal restart
522
- ```
523
-
524
- ---
525
-
526
- ### Colors Look Wrong
527
-
528
- **Symptoms:**
529
-
530
- - Colors don't match theme
531
- - Washed out or incorrect colors
532
-
533
- **Solutions:**
534
-
535
- 1. Check terminal color support
536
- 2. Verify theme settings
537
- 3. Test with different theme
538
- 4. Check ANSI color mode
539
-
540
- **Verify:**
541
-
542
- ```bash
543
- # Test colors
544
- ls --color=auto # Linux
545
- ls -G # macOS
546
- Get-ChildItem # PowerShell (auto-colored)
547
- ```
548
-
549
- ---
550
-
551
- ## Performance Considerations
552
-
553
- ### Buffer Optimization
554
-
555
- **Viewport-Based Rendering:**
556
-
557
- - Only renders visible lines
558
- - Uses viewport position
559
- - Avoids re-rendering entire buffer
560
-
561
- **Memory Management:**
562
-
563
- - Scrollback limit prevents unbounded growth
564
- - Older lines automatically removed
565
- - Token grouping reduces React components
566
-
567
- ---
568
-
569
- ### Responsive Behavior
570
-
571
- **Width Calculation:**
572
-
573
- - Adapts to UI layout
574
- - Accounts for side panel visibility
575
- - Minimum width: 10 columns
576
-
577
- **Height Calculation:**
578
-
579
- - Adapts to available space
580
- - Accounts for header and status bar
581
- - Minimum height: 1 row
582
-
583
- **Dynamic Resize:**
584
-
585
- - Automatically resizes on layout changes
586
- - Resizes both xterm and PTY together
587
- - Errors silently caught
588
-
589
- ---
590
-
591
- ## Best Practices
592
-
593
- ### Terminal Usage
594
-
595
- 1. **Check Process Status** - Verify `isRunning` before sending commands
596
- 2. **Use Appropriate Method** - `sendCommand()` for complete commands, `sendRawInput()` for interactive input
597
- 3. **Handle Errors** - Wrap PTY operations in try-catch
598
- 4. **Clean Up** - Dispose properly on unmount
599
-
600
- ---
601
-
602
- ### Command Execution
603
-
604
- 1. **Test Commands** - Test commands manually before automation
605
- 2. **Handle Output** - Parse output appropriately
606
- 3. **Check Exit Codes** - Verify command success
607
- 4. **Timeout Long Commands** - Set timeouts for long-running commands
608
-
609
- ---
610
-
611
- ### Performance
612
-
613
- 1. **Limit Scrollback** - Keep scrollback buffer reasonable
614
- 2. **Clear Regularly** - Clear terminal when not needed
615
- 3. **Avoid Spam** - Don't send commands too rapidly
616
- 4. **Monitor Memory** - Watch for memory leaks
617
-
618
- ---
619
-
620
- ## Related Documentation
621
-
622
- - [UI Guide](./UIGuide.md) - Main interface documentation
623
- - [Commands Reference](./Commands.md) - All slash commands
624
- - [Keyboard Shortcuts](./keybinds.md) - Keybind reference
625
- - [Tools System](../Tools/UserGuide.md) - Tool documentation
626
-
627
- ---
628
-
629
- ## External Resources
630
-
631
- - [xterm.js Documentation](https://xtermjs.org/)
632
- - [node-pty Documentation](https://github.com/microsoft/node-pty)
633
- - [ANSI Escape Codes](https://en.wikipedia.org/wiki/ANSI_escape_code)
634
-
635
- ---
636
-
637
- **Last Updated:** January 26, 2026