@ridit/lens 0.2.4 → 0.2.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.
- package/LENS.md +32 -68
- package/README.md +91 -0
- package/dist/index.mjs +69211 -2205
- package/package.json +6 -3
- package/src/commands/commit.tsx +713 -0
- package/src/components/chat/ChatOverlays.tsx +14 -4
- package/src/components/chat/ChatRunner.tsx +197 -30
- package/src/components/timeline/CommitDetail.tsx +2 -4
- package/src/components/timeline/CommitList.tsx +2 -14
- package/src/components/timeline/TimelineChat.tsx +1 -2
- package/src/components/timeline/TimelineRunner.tsx +505 -422
- package/src/index.tsx +38 -0
- package/src/prompts/fewshot.ts +100 -3
- package/src/prompts/system.ts +16 -20
- package/src/tools/chart.ts +210 -0
- package/src/tools/convert-image.ts +312 -0
- package/src/tools/files.ts +1 -9
- package/src/tools/git.ts +577 -0
- package/src/tools/index.ts +17 -13
- package/src/tools/view-image.ts +335 -0
- package/src/tools/web.ts +0 -4
- package/src/utils/chat.ts +7 -17
- package/src/utils/thinking.tsx +275 -162
- package/src/utils/tools/builtins.ts +8 -31
package/src/utils/thinking.tsx
CHANGED
|
@@ -2,182 +2,295 @@ import { useEffect, useState } from "react";
|
|
|
2
2
|
|
|
3
3
|
const PHRASES: Record<string, string[]> = {
|
|
4
4
|
general: [
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"lowkey computing...",
|
|
37
|
-
"in my bag rn...",
|
|
38
|
-
"it's giving... processing...",
|
|
39
|
-
"understood the assignment...",
|
|
40
|
-
"era of thinking...",
|
|
41
|
-
"main character moment...",
|
|
42
|
-
"this is the way...",
|
|
43
|
-
"based response incoming...",
|
|
44
|
-
"big brain time...",
|
|
45
|
-
"galaxy brained...",
|
|
46
|
-
"cooked something up...",
|
|
47
|
-
"chefkiss incoming...",
|
|
48
|
-
"slay mode: on...",
|
|
49
|
-
"rizzing up an answer...",
|
|
50
|
-
"rizzing up a baddie answer...",
|
|
51
|
-
"sigma grindset: activated...",
|
|
52
|
-
"NPC behavior: disabled...",
|
|
53
|
-
"unaliving my writer's block...",
|
|
54
|
-
"caught in 4K thinking...",
|
|
55
|
-
"delulu but make it accurate...",
|
|
56
|
-
"ate and left no crumbs...",
|
|
57
|
-
"rent free in the codebase...",
|
|
58
|
-
"understood the assignment (fr fr)...",
|
|
59
|
-
"giving main character energy...",
|
|
60
|
-
"no thoughts, head full...",
|
|
61
|
-
"built different response incoming...",
|
|
62
|
-
"chronically online and loving it...",
|
|
63
|
-
"touch grass? not yet...",
|
|
64
|
-
"this response is bussin...",
|
|
65
|
-
"lowkey highkey computing...",
|
|
66
|
-
"it's giving Einstein...",
|
|
67
|
-
"we do a little thinking...",
|
|
68
|
-
"gigachad analysis mode...",
|
|
69
|
-
"the audacity to be this smart...",
|
|
70
|
-
|
|
71
|
-
"consulting the void...",
|
|
72
|
-
"asking my other personalities...",
|
|
73
|
-
"reading the codebase tea leaves...",
|
|
74
|
-
"vibing with your files...",
|
|
75
|
-
"channeling senior engineer energy...",
|
|
76
|
-
"pretending i know what i'm doing...",
|
|
77
|
-
"staring at the wall (productively)...",
|
|
78
|
-
"definitely not making this up...",
|
|
5
|
+
"marinating on that... 🍖",
|
|
6
|
+
"letting it simmer... 🍲",
|
|
7
|
+
"preheating the brain... 🔥",
|
|
8
|
+
"seasoning the response... 🧂",
|
|
9
|
+
"slow cooking an answer... 🐢",
|
|
10
|
+
"whisking it together... 🥄",
|
|
11
|
+
"folding in the context... 📄",
|
|
12
|
+
"reducing the codebase... 🧠",
|
|
13
|
+
"deglazing with tokens... ✨",
|
|
14
|
+
"plating the thoughts... 🍽️",
|
|
15
|
+
// new additions
|
|
16
|
+
"blending the chaos... 🌀",
|
|
17
|
+
"tasting the logic... 👅",
|
|
18
|
+
"kneading the ideas... 🥖",
|
|
19
|
+
"sautéing thoughts... 🍳",
|
|
20
|
+
"folding in extra brainpower... 🧠",
|
|
21
|
+
"caramelizing the mistakes... 🍯",
|
|
22
|
+
"letting it chill... ❄️",
|
|
23
|
+
"flambéing the bugs... 🔥",
|
|
24
|
+
"mixing code and chaos... 🥣",
|
|
25
|
+
"plating the hot take... 🔥🍽️",
|
|
26
|
+
"simmering existential dread... 🫠",
|
|
27
|
+
"tempering the output... ⚡",
|
|
28
|
+
"basting with logic... 🧂",
|
|
29
|
+
"drizzling insight... 🌧️",
|
|
30
|
+
"sprinkling genius... ✨",
|
|
31
|
+
"slow roasting complexity... 🐢🔥",
|
|
32
|
+
"blending the universe... 🌌",
|
|
33
|
+
"whipping up brilliance... 🥄💡",
|
|
34
|
+
"folding in main character energy... 🌟",
|
|
35
|
+
"checking internal temperatures... 🌡️",
|
|
79
36
|
],
|
|
80
37
|
|
|
81
38
|
cloning: [
|
|
82
|
-
"cloning at the speed of git...",
|
|
83
|
-
"negotiating with github...",
|
|
84
|
-
"untangling the object graph...",
|
|
85
|
-
"counting commits like sheep...",
|
|
86
|
-
"shallow clone, deep thoughts...",
|
|
87
|
-
"fetching the whole iceberg...",
|
|
88
|
-
"packing objects...",
|
|
89
|
-
"resolving deltas...",
|
|
90
|
-
"checking out the vibes...",
|
|
91
|
-
"recursing into submodules...",
|
|
92
|
-
"buffering the bits...",
|
|
93
|
-
"git is being git...",
|
|
94
|
-
"praying to the network gods...",
|
|
95
|
-
"downloading the internet (just your repo)...",
|
|
39
|
+
"cloning at the speed of git... 🚀",
|
|
40
|
+
"negotiating with github... 🤝",
|
|
41
|
+
"untangling the object graph... 🧶",
|
|
42
|
+
"counting commits like sheep... 🐑",
|
|
43
|
+
"shallow clone, deep thoughts... 🌊",
|
|
44
|
+
"fetching the whole iceberg... 🧊",
|
|
45
|
+
"packing objects... 📦",
|
|
46
|
+
"resolving deltas... 🔄",
|
|
47
|
+
"checking out the vibes... 😎",
|
|
48
|
+
"recursing into submodules... 🔁",
|
|
49
|
+
"buffering the bits... 💾",
|
|
50
|
+
"git is being git... 🤷",
|
|
51
|
+
"praying to the network gods... 🙏",
|
|
52
|
+
"downloading the internet (just your repo)... 🌐",
|
|
53
|
+
// new additions
|
|
54
|
+
"forking in style... 🍴",
|
|
55
|
+
"pulling commits aggressively... 🏃♂️",
|
|
56
|
+
"syncing the vibes... 🌊",
|
|
57
|
+
"deep cloning existential crises... 😵",
|
|
58
|
+
"cherry-picking brilliance... 🍒",
|
|
59
|
+
"rewriting history (just a little)... 📝",
|
|
60
|
+
"fast-forwarding thoughts... ⏩",
|
|
61
|
+
"merging with the multiverse... 🌌",
|
|
62
|
+
"rebasing reality... 🔄",
|
|
63
|
+
"checking out chaos... 😎",
|
|
64
|
+
"cloning like a pro... 👑",
|
|
65
|
+
"replicating the vibes... 🔁",
|
|
66
|
+
"buffer overflow in progress... 💾",
|
|
67
|
+
"pull request to sanity... 🤯",
|
|
68
|
+
"diverging the timeline... ⏳",
|
|
69
|
+
"squashing git guilt... 🪓",
|
|
70
|
+
"fetching inspiration... 📡",
|
|
71
|
+
"pruning branches... 🌿",
|
|
72
|
+
"syncing neurons... 🧠",
|
|
73
|
+
"shallow clone, deep existential dread... 🌊😵",
|
|
96
74
|
],
|
|
97
75
|
|
|
98
76
|
analyzing: [
|
|
99
|
-
"reading every file (skimming)...",
|
|
100
|
-
"building a mental model...",
|
|
101
|
-
"reverse engineering intent...",
|
|
102
|
-
"parsing the chaos...",
|
|
103
|
-
"connecting the dots...",
|
|
104
|
-
"finding the load-bearing files...",
|
|
105
|
-
"mapping the dependency graph...",
|
|
106
|
-
"absorbing the architecture...",
|
|
107
|
-
"noticing things...",
|
|
108
|
-
"judging your folder structure...",
|
|
109
|
-
"appreciating the tech debt...",
|
|
110
|
-
"counting your TODOs...",
|
|
111
|
-
"reading between the lines...",
|
|
112
|
-
"anthropic-ifying your codebase...",
|
|
113
|
-
"following the import trail...",
|
|
114
|
-
"speed-reading your life's work...",
|
|
115
|
-
"pretending to understand your monorepo...",
|
|
77
|
+
"reading every file (skimming)... 📖",
|
|
78
|
+
"building a mental model... 🧠",
|
|
79
|
+
"reverse engineering intent... 🔍",
|
|
80
|
+
"parsing the chaos... 🌀",
|
|
81
|
+
"connecting the dots... 🔗",
|
|
82
|
+
"finding the load-bearing files... 🏗️",
|
|
83
|
+
"mapping the dependency graph... 🗺️",
|
|
84
|
+
"absorbing the architecture... 🧱",
|
|
85
|
+
"noticing things... 👀",
|
|
86
|
+
"judging your folder structure... 😭",
|
|
87
|
+
"appreciating the tech debt... 💳",
|
|
88
|
+
"counting your TODOs... 📋",
|
|
89
|
+
"reading between the lines... ✍️",
|
|
90
|
+
"anthropic-ifying your codebase... 🤖",
|
|
91
|
+
"following the import trail... 🧭",
|
|
92
|
+
"speed-reading your life's work... ⚡",
|
|
93
|
+
"pretending to understand your monorepo... 🏢",
|
|
94
|
+
// new additions
|
|
95
|
+
"debugging the cosmos... 🌌",
|
|
96
|
+
"profiling your thoughts... 📊",
|
|
97
|
+
"mapping mental threads... 🧵",
|
|
98
|
+
"sifting through the noise... 🌪️",
|
|
99
|
+
"predicting your next move... 🔮",
|
|
100
|
+
"annotating life... ✍️",
|
|
101
|
+
"absorbing the vibes... 🧘",
|
|
102
|
+
"peering into recursion... 🔁",
|
|
103
|
+
"modeling chaos... 🧩",
|
|
104
|
+
"counting edge cases... ⚠️",
|
|
105
|
+
"tracking call stacks... 🧗",
|
|
106
|
+
"parsing your aura... 🌈",
|
|
107
|
+
"reading the README of life... 📖",
|
|
108
|
+
"analyzing existential types... 🤯",
|
|
109
|
+
"observing folder hierarchies... 📂",
|
|
110
|
+
"profiling main character energy... 🎬",
|
|
111
|
+
"absorbing every commit... 💾",
|
|
112
|
+
"studying the architecture... 🏛️",
|
|
113
|
+
"checking for ghost functions... 👻",
|
|
114
|
+
"validating vibes... ✅",
|
|
116
115
|
],
|
|
117
116
|
|
|
118
117
|
model: [
|
|
119
|
-
"deciding which files matter...",
|
|
120
|
-
"picking the important ones...",
|
|
121
|
-
"triaging your codebase...",
|
|
122
|
-
"figuring out where to look...",
|
|
123
|
-
"consulting the file oracle...",
|
|
124
|
-
"narrowing it down...",
|
|
125
|
-
"skimming the directory...",
|
|
126
|
-
"choosing wisely...",
|
|
127
|
-
"not reading everything (smart)...",
|
|
128
|
-
"filtering the noise...",
|
|
129
|
-
"asking the oracle...",
|
|
130
|
-
"pinging the motherbrain...",
|
|
131
|
-
"waiting on the neurons...",
|
|
132
|
-
"tokens incoming...",
|
|
133
|
-
"model is cooking...",
|
|
134
|
-
"inference in progress...",
|
|
135
|
-
"the GPU is thinking...",
|
|
136
|
-
"attention is all we need...",
|
|
137
|
-
"cross-attending to your vibes...",
|
|
138
|
-
"softmaxing the options...",
|
|
139
|
-
"sampling from the distribution...",
|
|
140
|
-
"temperature: just right...",
|
|
141
|
-
"context window: not full yet...",
|
|
142
|
-
"next token any second now...",
|
|
143
|
-
"beaming thoughts from the datacenter...",
|
|
144
|
-
"anthropic servers sweating...",
|
|
145
|
-
"matrix multiply in progress...",
|
|
118
|
+
"deciding which files matter... 🧠",
|
|
119
|
+
"picking the important ones... 🎯",
|
|
120
|
+
"triaging your codebase... 🚑",
|
|
121
|
+
"figuring out where to look... 👀",
|
|
122
|
+
"consulting the file oracle... 🔮",
|
|
123
|
+
"narrowing it down... 🔍",
|
|
124
|
+
"skimming the directory... 📂",
|
|
125
|
+
"choosing wisely... 🧠",
|
|
126
|
+
"not reading everything (smart)... 😎",
|
|
127
|
+
"filtering the noise... 🔇",
|
|
128
|
+
"asking the oracle... 🔮",
|
|
129
|
+
"pinging the motherbrain... 🧠",
|
|
130
|
+
"waiting on the neurons... ⏳",
|
|
131
|
+
"tokens incoming... 📥",
|
|
132
|
+
"model is cooking... 🍳",
|
|
133
|
+
"inference in progress... ⚙️",
|
|
134
|
+
"the GPU is thinking... 💻",
|
|
135
|
+
"attention is all we need... 🎯",
|
|
136
|
+
"cross-attending to your vibes... 🔄",
|
|
137
|
+
"softmaxing the options... 📊",
|
|
138
|
+
"sampling from the distribution... 🎲",
|
|
139
|
+
"temperature: just right... 🌡️",
|
|
140
|
+
"context window: not full yet... 🪟",
|
|
141
|
+
"next token any second now... ⏳",
|
|
142
|
+
"beaming thoughts from the datacenter... 📡",
|
|
143
|
+
"anthropic servers sweating... 💦",
|
|
144
|
+
"matrix multiply in progress... ➗",
|
|
145
|
+
// new additions
|
|
146
|
+
"initializing hype mode... 🚀",
|
|
147
|
+
"compiling neurons... 🧠",
|
|
148
|
+
"loading chaotic energy... ⚡",
|
|
149
|
+
"predicting your mood... 😏",
|
|
150
|
+
"sampling absurdity... 🎲",
|
|
151
|
+
"normalizing brainwaves... 🌊",
|
|
152
|
+
"cross-validating genius... 🧪",
|
|
153
|
+
"activating main character module... 🎬",
|
|
154
|
+
"warming up GPU... 💻🔥",
|
|
155
|
+
"spooling synapses... 🧵",
|
|
156
|
+
"calculating cringe factor... 🤡",
|
|
157
|
+
"preprocessing drama... 📦",
|
|
158
|
+
"injecting chaos vectors... ⚡",
|
|
159
|
+
"softmaxing life choices... 🧠",
|
|
160
|
+
"attention heads online... 👀",
|
|
161
|
+
"broadcasting vibes... 📡",
|
|
162
|
+
"loading meme embeddings... 🗿",
|
|
163
|
+
"quantizing mood... 🔢",
|
|
164
|
+
"clipping gradients of patience... ✂️",
|
|
165
|
+
"inferring main plot points... 📖",
|
|
146
166
|
],
|
|
167
|
+
|
|
147
168
|
summary: [
|
|
148
|
-
"synthesizing the chaos...",
|
|
149
|
-
"forming an opinion...",
|
|
150
|
-
"writing the verdict...",
|
|
151
|
-
"digesting everything...",
|
|
152
|
-
"putting it all together...",
|
|
153
|
-
"crafting the overview...",
|
|
154
|
-
"making sense of it all...",
|
|
155
|
-
"distilling the essence...",
|
|
156
|
-
"summarizing your life's work...",
|
|
157
|
-
"turning files into feelings...",
|
|
158
|
-
"extracting signal from noise...",
|
|
159
|
-
"generating hot takes...",
|
|
160
|
-
"cooking up the analysis...",
|
|
161
|
-
"almost done judging your code...",
|
|
162
|
-
"writing the report card...",
|
|
169
|
+
"synthesizing the chaos... 🧠",
|
|
170
|
+
"forming an opinion... 💭",
|
|
171
|
+
"writing the verdict... 📝",
|
|
172
|
+
"digesting everything... 🍽️",
|
|
173
|
+
"putting it all together... 🧩",
|
|
174
|
+
"crafting the overview... ✨",
|
|
175
|
+
"making sense of it all... 🤔",
|
|
176
|
+
"distilling the essence... 🧪",
|
|
177
|
+
"summarizing your life's work... 📚",
|
|
178
|
+
"turning files into feelings... 💔",
|
|
179
|
+
"extracting signal from noise... 📡",
|
|
180
|
+
"generating hot takes... 🔥",
|
|
181
|
+
"cooking up the analysis... 🍳",
|
|
182
|
+
"almost done judging your code... 👀",
|
|
183
|
+
"writing the report card... 📊",
|
|
184
|
+
// new additions
|
|
185
|
+
"digesting chaos into art... 🎨",
|
|
186
|
+
"compressing existential dread... 🫠",
|
|
187
|
+
"executing life summary... 📝",
|
|
188
|
+
"extracting hot takes... 🔥",
|
|
189
|
+
"packaging thoughts nicely... 📦",
|
|
190
|
+
"synthesizing main character energy... 🌟",
|
|
191
|
+
"boiling down code spaghetti... 🍝",
|
|
192
|
+
"condensing into brilliance... ✨",
|
|
193
|
+
"drawing the final diagram... 📊",
|
|
194
|
+
"reporting on universal logic... 🌌",
|
|
195
|
+
"giving verdict with style... 😎",
|
|
196
|
+
"folding in chaos gracefully... 🌀",
|
|
197
|
+
"capturing essence... 📸",
|
|
198
|
+
"writing the epic conclusion... 📜",
|
|
199
|
+
"connecting all dots... 🔗",
|
|
200
|
+
"rendering summary in HD... 📺",
|
|
201
|
+
"wrapping thoughts in elegance... 🎁",
|
|
202
|
+
"making insights bussin... 🥵",
|
|
203
|
+
"compressing noise... 🔇",
|
|
204
|
+
"finishing the mental buffet... 🍽️",
|
|
163
205
|
],
|
|
164
206
|
|
|
165
207
|
task: [
|
|
166
|
-
"thinking about your ask...",
|
|
167
|
-
"processing the request...",
|
|
168
|
-
"on it...",
|
|
169
|
-
"got it, working...",
|
|
170
|
-
"considering the angles...",
|
|
171
|
-
"thinking this through...",
|
|
172
|
-
"working on it...",
|
|
173
|
-
"cooking up a plan...",
|
|
174
|
-
"breaking it down...",
|
|
175
|
-
"figuring out the approach...",
|
|
176
|
-
"strategizing...",
|
|
177
|
-
"mapping out the steps...",
|
|
178
|
-
"scoping the work...",
|
|
179
|
-
"locking in...",
|
|
180
|
-
"challenge accepted...",
|
|
208
|
+
"thinking about your ask... 🤔",
|
|
209
|
+
"processing the request... ⚙️",
|
|
210
|
+
"on it... 🫡",
|
|
211
|
+
"got it, working... 💻",
|
|
212
|
+
"considering the angles... 🔺",
|
|
213
|
+
"thinking this through... 🧠",
|
|
214
|
+
"working on it... 🔧",
|
|
215
|
+
"cooking up a plan... 🍳",
|
|
216
|
+
"breaking it down... 🧩",
|
|
217
|
+
"figuring out the approach... 🧭",
|
|
218
|
+
"strategizing... 📊",
|
|
219
|
+
"mapping out the steps... 🗺️",
|
|
220
|
+
"scoping the work... 📏",
|
|
221
|
+
"locking in... 🔒",
|
|
222
|
+
"challenge accepted... ⚔️",
|
|
223
|
+
// new additions
|
|
224
|
+
"igniting the thinking engines... 🔥",
|
|
225
|
+
"prioritizing chaos... 📝",
|
|
226
|
+
"breaking down mental blocks... 🧱",
|
|
227
|
+
"assembling the mental toolkit... 🛠️",
|
|
228
|
+
"deploying logic... 🚀",
|
|
229
|
+
"strategizing with style... 💅",
|
|
230
|
+
"mapping the mental maze... 🗺️",
|
|
231
|
+
"executing plan... ⚙️",
|
|
232
|
+
"optimizing approach... 🧠",
|
|
233
|
+
"thinking outside the semicolon... ;",
|
|
234
|
+
"iterating on brilliance... 🔄",
|
|
235
|
+
"analyzing all angles... 🔺",
|
|
236
|
+
"tracking progress... 📊",
|
|
237
|
+
"debugging plan... 🐞",
|
|
238
|
+
"brainstorming in HD... 💭",
|
|
239
|
+
"navigating chaos... 🧭",
|
|
240
|
+
"forming master plan... 🏗️",
|
|
241
|
+
"locking in focus... 🔒",
|
|
242
|
+
"assembling neural units... 🧩",
|
|
243
|
+
"finalizing strategy... ✅",
|
|
244
|
+
],
|
|
245
|
+
|
|
246
|
+
commit: [
|
|
247
|
+
"sniffing the diff... 👃",
|
|
248
|
+
"reading your crimes... 😭",
|
|
249
|
+
"git add -A (the audacity)... 😤",
|
|
250
|
+
"crafting the perfect lie^H^H^H message... 📝",
|
|
251
|
+
"summoning commit message energy... ✨",
|
|
252
|
+
"writing words that will haunt the git log... 👻",
|
|
253
|
+
"pretending this was intentional all along... 😎",
|
|
254
|
+
"making it sound like a feature... 🚀",
|
|
255
|
+
"staging your changes (and your career)... 📦",
|
|
256
|
+
"turning chaos into conventional commits... 🧠",
|
|
257
|
+
"making history. literally... 📜",
|
|
258
|
+
"git blame: not it... 🫣",
|
|
259
|
+
"this commit brought to you by AI... 🤖",
|
|
260
|
+
"imperative mood activated... ⚡",
|
|
261
|
+
"72 chars or bust... 📏",
|
|
262
|
+
"no WIP commits on my watch... 🚫",
|
|
263
|
+
"writing the commit future-you will thank me for... 🙏",
|
|
264
|
+
"touching the object store... 🗄️",
|
|
265
|
+
"packing your changes real tight... 📦",
|
|
266
|
+
"signing off mentally... 🧠",
|
|
267
|
+
"squash? no. this one deserves to live... 🧬",
|
|
268
|
+
"git log will remember this... 📖",
|
|
269
|
+
"diffing the vibe before committing... 🔍",
|
|
270
|
+
"committing to the bit. and also the repo... 💾",
|
|
271
|
+
"generating a message with zero typos (probably)... 😅",
|
|
272
|
+
"making main proud... 🏆",
|
|
273
|
+
// new additions
|
|
274
|
+
"annotating history with chaos... 📝",
|
|
275
|
+
"staging brilliance... 🌟",
|
|
276
|
+
"blaming the compiler... 🤖",
|
|
277
|
+
"git commit -m 'oops'... 😅",
|
|
278
|
+
"crafting legendary messages... 🏆",
|
|
279
|
+
"squashing typos... ✂️",
|
|
280
|
+
"documenting chaos... 📜",
|
|
281
|
+
"ghostwriting commit energy... 👻",
|
|
282
|
+
"pushing existential code... 🚀",
|
|
283
|
+
"reviewing self-inflicted bugs... 😭",
|
|
284
|
+
"summoning git spirits... 👻",
|
|
285
|
+
"committing main character vibes... 🎬",
|
|
286
|
+
"annotating universal truths... 🌌",
|
|
287
|
+
"logging brain activity... 🧠",
|
|
288
|
+
"staging memes... 🗿",
|
|
289
|
+
"locking in brilliance... 🔒",
|
|
290
|
+
"quantifying audacity... 😤",
|
|
291
|
+
"making history, one commit at a time... 📖",
|
|
292
|
+
"git blame: me again... 😎",
|
|
293
|
+
"finalizing legendary diff... ✨",
|
|
181
294
|
],
|
|
182
295
|
};
|
|
183
296
|
|
|
@@ -11,10 +11,12 @@ import {
|
|
|
11
11
|
deleteFile,
|
|
12
12
|
deleteFolder,
|
|
13
13
|
generatePdf,
|
|
14
|
+
viewImageTool,
|
|
15
|
+
registerGitTools,
|
|
16
|
+
chartDataTool,
|
|
17
|
+
convertImageTool,
|
|
14
18
|
} from "../../tools";
|
|
15
19
|
|
|
16
|
-
// ── fetch ─────────────────────────────────────────────────────────────────────
|
|
17
|
-
|
|
18
20
|
export const fetchTool: Tool<string> = {
|
|
19
21
|
name: "fetch",
|
|
20
22
|
description: "load a URL",
|
|
@@ -37,8 +39,6 @@ export const fetchTool: Tool<string> = {
|
|
|
37
39
|
},
|
|
38
40
|
};
|
|
39
41
|
|
|
40
|
-
// ── shell ─────────────────────────────────────────────────────────────────────
|
|
41
|
-
|
|
42
42
|
export const shellTool: Tool<string> = {
|
|
43
43
|
name: "shell",
|
|
44
44
|
description: "run a terminal command",
|
|
@@ -54,8 +54,6 @@ export const shellTool: Tool<string> = {
|
|
|
54
54
|
},
|
|
55
55
|
};
|
|
56
56
|
|
|
57
|
-
// ── read-file ─────────────────────────────────────────────────────────────────
|
|
58
|
-
|
|
59
57
|
export const readFileTool: Tool<string> = {
|
|
60
58
|
name: "read-file",
|
|
61
59
|
description: "read a file from the repo",
|
|
@@ -71,8 +69,6 @@ export const readFileTool: Tool<string> = {
|
|
|
71
69
|
}),
|
|
72
70
|
};
|
|
73
71
|
|
|
74
|
-
// ── read-folder ───────────────────────────────────────────────────────────────
|
|
75
|
-
|
|
76
72
|
export const readFolderTool: Tool<string> = {
|
|
77
73
|
name: "read-folder",
|
|
78
74
|
description: "list contents of a folder (files + subfolders, one level deep)",
|
|
@@ -88,8 +84,6 @@ export const readFolderTool: Tool<string> = {
|
|
|
88
84
|
}),
|
|
89
85
|
};
|
|
90
86
|
|
|
91
|
-
// ── grep ──────────────────────────────────────────────────────────────────────
|
|
92
|
-
|
|
93
87
|
interface GrepInput {
|
|
94
88
|
pattern: string;
|
|
95
89
|
glob: string;
|
|
@@ -117,8 +111,6 @@ export const grepTool: Tool<GrepInput> = {
|
|
|
117
111
|
}),
|
|
118
112
|
};
|
|
119
113
|
|
|
120
|
-
// ── write-file ────────────────────────────────────────────────────────────────
|
|
121
|
-
|
|
122
114
|
interface WriteFileInput {
|
|
123
115
|
path: string;
|
|
124
116
|
content: string;
|
|
@@ -147,8 +139,6 @@ export const writeFileTool: Tool<WriteFileInput> = {
|
|
|
147
139
|
}),
|
|
148
140
|
};
|
|
149
141
|
|
|
150
|
-
// ── delete-file ───────────────────────────────────────────────────────────────
|
|
151
|
-
|
|
152
142
|
export const deleteFileTool: Tool<string> = {
|
|
153
143
|
name: "delete-file",
|
|
154
144
|
description: "permanently delete a single file",
|
|
@@ -164,8 +154,6 @@ export const deleteFileTool: Tool<string> = {
|
|
|
164
154
|
}),
|
|
165
155
|
};
|
|
166
156
|
|
|
167
|
-
// ── delete-folder ─────────────────────────────────────────────────────────────
|
|
168
|
-
|
|
169
157
|
export const deleteFolderTool: Tool<string> = {
|
|
170
158
|
name: "delete-folder",
|
|
171
159
|
description: "permanently delete a folder and all its contents",
|
|
@@ -181,8 +169,6 @@ export const deleteFolderTool: Tool<string> = {
|
|
|
181
169
|
}),
|
|
182
170
|
};
|
|
183
171
|
|
|
184
|
-
// ── open-url ──────────────────────────────────────────────────────────────────
|
|
185
|
-
|
|
186
172
|
export const openUrlTool: Tool<string> = {
|
|
187
173
|
name: "open-url",
|
|
188
174
|
description: "open a URL in the user's default browser",
|
|
@@ -195,8 +181,6 @@ export const openUrlTool: Tool<string> = {
|
|
|
195
181
|
execute: (url) => ({ kind: "text", value: openUrl(url) }),
|
|
196
182
|
};
|
|
197
183
|
|
|
198
|
-
// ── generate-pdf ──────────────────────────────────────────────────────────────
|
|
199
|
-
|
|
200
184
|
interface GeneratePdfInput {
|
|
201
185
|
filePath: string;
|
|
202
186
|
content: string;
|
|
@@ -231,8 +215,6 @@ export const generatePdfTool: Tool<GeneratePdfInput> = {
|
|
|
231
215
|
}),
|
|
232
216
|
};
|
|
233
217
|
|
|
234
|
-
// ── search ────────────────────────────────────────────────────────────────────
|
|
235
|
-
|
|
236
218
|
export const searchTool: Tool<string> = {
|
|
237
219
|
name: "search",
|
|
238
220
|
description: "search the internet for anything you are unsure about",
|
|
@@ -255,8 +237,6 @@ export const searchTool: Tool<string> = {
|
|
|
255
237
|
},
|
|
256
238
|
};
|
|
257
239
|
|
|
258
|
-
// ── clone ─────────────────────────────────────────────────────────────────────
|
|
259
|
-
|
|
260
240
|
export const cloneTool: Tool<string> = {
|
|
261
241
|
name: "clone",
|
|
262
242
|
description: "clone a GitHub repo so you can explore and discuss it",
|
|
@@ -266,16 +246,12 @@ export const cloneTool: Tool<string> = {
|
|
|
266
246
|
`### ${i}. clone — clone a GitHub repo so you can explore and discuss it\n<clone>https://github.com/owner/repo</clone>`,
|
|
267
247
|
parseInput: (body) => body.replace(/^<|>$/g, "").trim() || null,
|
|
268
248
|
summariseInput: (url) => url,
|
|
269
|
-
// Clone is handled specially by ChatRunner (it triggers a UI flow),
|
|
270
|
-
// so execute here is just a fallback that should never run.
|
|
271
249
|
execute: (repoUrl) => ({
|
|
272
250
|
kind: "text",
|
|
273
251
|
value: `Clone of ${repoUrl} was handled by the UI.`,
|
|
274
252
|
}),
|
|
275
253
|
};
|
|
276
254
|
|
|
277
|
-
// ── changes ───────────────────────────────────────────────────────────────────
|
|
278
|
-
|
|
279
255
|
export interface ChangesInput {
|
|
280
256
|
summary: string;
|
|
281
257
|
patches: { path: string; content: string; isNew: boolean }[];
|
|
@@ -296,15 +272,12 @@ export const changesTool: Tool<ChangesInput> = {
|
|
|
296
272
|
}
|
|
297
273
|
},
|
|
298
274
|
summariseInput: ({ summary }) => summary,
|
|
299
|
-
// changes is handled specially by ChatRunner (diff preview UI).
|
|
300
275
|
execute: ({ summary }) => ({
|
|
301
276
|
kind: "text",
|
|
302
277
|
value: `Changes proposed: ${summary}`,
|
|
303
278
|
}),
|
|
304
279
|
};
|
|
305
280
|
|
|
306
|
-
// ── registerBuiltins ──────────────────────────────────────────────────────────
|
|
307
|
-
|
|
308
281
|
import { registry } from "./registry";
|
|
309
282
|
|
|
310
283
|
export function registerBuiltins(): void {
|
|
@@ -321,4 +294,8 @@ export function registerBuiltins(): void {
|
|
|
321
294
|
registry.register(searchTool);
|
|
322
295
|
registry.register(cloneTool);
|
|
323
296
|
registry.register(changesTool);
|
|
297
|
+
registry.register(viewImageTool);
|
|
298
|
+
registry.register(chartDataTool);
|
|
299
|
+
registry.register(convertImageTool);
|
|
300
|
+
registerGitTools();
|
|
324
301
|
}
|