wdyt 0.1.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/LICENSE +21 -0
- package/README.md +83 -0
- package/package.json +52 -0
- package/src/cli.ts +267 -0
- package/src/commands/builder.ts +85 -0
- package/src/commands/chat.ts +306 -0
- package/src/commands/init.ts +222 -0
- package/src/commands/prompt.ts +188 -0
- package/src/commands/select.ts +180 -0
- package/src/commands/windows.ts +54 -0
- package/src/state.test.ts +184 -0
- package/src/state.ts +282 -0
- package/src/types.ts +69 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for wdyt - Code review context builder for LLMs
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/** Tab within a window */
|
|
6
|
+
export interface Tab {
|
|
7
|
+
id: string;
|
|
8
|
+
prompt: string;
|
|
9
|
+
selectedFiles: string[];
|
|
10
|
+
createdAt: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Window representation */
|
|
14
|
+
export interface Window {
|
|
15
|
+
id: number;
|
|
16
|
+
rootFolderPaths: string[];
|
|
17
|
+
tabs: Tab[];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** Builder configuration for creating a new tab */
|
|
21
|
+
export interface BuilderConfig {
|
|
22
|
+
summary?: string;
|
|
23
|
+
path?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Selection state for a tab */
|
|
28
|
+
export interface SelectionState {
|
|
29
|
+
files: string[];
|
|
30
|
+
folders: string[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Prompt data for a tab */
|
|
34
|
+
export interface PromptData {
|
|
35
|
+
prompt: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Chat send request */
|
|
39
|
+
export interface ChatSendRequest {
|
|
40
|
+
message?: string;
|
|
41
|
+
export_path?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** CLI flags parsed from command line */
|
|
45
|
+
export interface CLIFlags {
|
|
46
|
+
rawJson: boolean;
|
|
47
|
+
window?: number;
|
|
48
|
+
tab?: string;
|
|
49
|
+
expression?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** Result of command execution */
|
|
53
|
+
export interface CommandResult {
|
|
54
|
+
success: boolean;
|
|
55
|
+
data?: unknown;
|
|
56
|
+
error?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** State file structure */
|
|
60
|
+
export interface StateFile {
|
|
61
|
+
version: number;
|
|
62
|
+
windows: Window[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** Tab update data - partial fields that can be updated */
|
|
66
|
+
export interface TabUpdate {
|
|
67
|
+
prompt?: string;
|
|
68
|
+
selectedFiles?: string[];
|
|
69
|
+
}
|