@gajae-code/tui 0.5.1 → 0.5.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.
@@ -22,7 +22,7 @@ interface HistoryEntry {
22
22
  }
23
23
  interface HistoryStorage {
24
24
  add(prompt: string, cwd?: string): Promise<void>;
25
- getRecent(limit: number): HistoryEntry[];
25
+ getRecent(limit: number, cwd?: string): HistoryEntry[];
26
26
  }
27
27
  export declare class Editor implements Component, Focusable {
28
28
  #private;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@gajae-code/tui",
4
- "version": "0.5.1",
4
+ "version": "0.5.2",
5
5
  "description": "Terminal User Interface library with differential rendering for efficient text-based applications",
6
6
  "homepage": "https://gaebal-gajae.dev",
7
7
  "author": "Yeachan-Heo",
@@ -38,8 +38,8 @@
38
38
  "fmt": "biome format --write ."
39
39
  },
40
40
  "dependencies": {
41
- "@gajae-code/natives": "0.5.1",
42
- "@gajae-code/utils": "0.5.1",
41
+ "@gajae-code/natives": "0.5.2",
42
+ "@gajae-code/utils": "0.5.2",
43
43
  "lru-cache": "11.3.6",
44
44
  "marked": "^18.0.3"
45
45
  },
@@ -368,7 +368,7 @@ interface HistoryEntry {
368
368
 
369
369
  interface HistoryStorage {
370
370
  add(prompt: string, cwd?: string): Promise<void>;
371
- getRecent(limit: number): HistoryEntry[];
371
+ getRecent(limit: number, cwd?: string): HistoryEntry[];
372
372
  }
373
373
 
374
374
  type HistoryCursorAnchor = "start" | "end";
@@ -554,7 +554,7 @@ export class Editor implements Component, Focusable {
554
554
 
555
555
  setHistoryStorage(storage: HistoryStorage): void {
556
556
  this.#historyStorage = storage;
557
- const recent = storage.getRecent(100);
557
+ const recent = storage.getRecent(100, getProjectDir());
558
558
  this.#history = recent.map(entry => entry.prompt);
559
559
  this.#historyIndex = -1;
560
560
  }