-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.aiih
435 lines (342 loc) · 17.3 KB
/
.aiih
1
2
3
4
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
# 2024-12-11 10:35:50.453849
+/add src/renderer/src/components/settings-dialog.tsx
# 2024-12-11 10:36:30.525084
+/code In the General, add a ShadCN input for an OpenAI API key.
# 2024-12-11 10:38:16.411933
+/code Move the find in page to a separate component file in the components folder
# 2024-12-11 10:38:27.361715
+/add src/renderer/src/App.tsx
# 2024-12-11 10:38:36.693720
+/code Move the find in page to a separate component file in the components folder
# 2024-12-11 11:41:23.761952
+/code Also please move the Tab component to a separate file.
# 2024-12-11 11:44:08.530970
+/add src/main/index.ts
# 2024-12-11 11:44:17.130629
+/add electron-builder.yml
# 2024-12-11 11:44:31.466823
+/ask Is auto-update setup correctly?
# 2024-12-11 11:45:31.103923
+/code Implement your changes
# 2024-12-11 11:47:07.290121
+/commit
# 2024-12-11 13:01:55.392770
+/add src/renderer/src/components/FindInPage.tsx
# 2024-12-11 13:03:12.488779
+/add src/renderer/src/components/settings-dialog.tsx
# 2024-12-11 13:03:20.810463
+/code Make it so that there is an AI button next to
+ the find button which sends a message to the chatGPT
+ API with the URL of the page, so that the user can a
+sk question. The API key is stored in a setting
# 2024-12-11 13:04:59.163073
+/code Works perfectly! But do not open a dialog, the question is already in the SearchTerm. The answer must appear under the existing input
# 2024-12-11 16:26:20.806927
+/commit
# 2024-12-11 16:26:36.620057
+/add src/renderer/src/components/FindInPage.tsx
# 2024-12-11 16:27:05.036486
+/code Instead of sending the URL to the AI, convert the URL's webpage to text and send that
# 2024-12-11 16:27:46.393150
+/code Change it back to 4o
# 2024-12-11 16:30:07.898226
+/code Edit the prompt so that the AI returns short summaries and bullet points if needed
# 2024-12-11 16:30:50.266429
+/code It always does bullet points now
# 2024-12-11 16:33:09.406132
+/code Awesome! Now make it so that the div that shows the answer handles markdown
# 2024-12-11 16:33:25.407517
+y
# 2024-12-11 16:33:25.413869
+/run bun add react-markdown
# 2024-12-11 16:33:25.414053
+/run bun add react-markdown
# 2024-12-11 16:33:33.757985
+n
# 2024-12-11 16:33:36.149563
+/run bun add -D @tailwindcss/typography
# 2024-12-11 16:33:36.149840
+/run bun add -D @tailwindcss/typography
# 2024-12-11 16:33:39.994251
+n
# 2024-12-11 19:08:44.415787
+/commit
# 2024-12-11 19:08:58.267574
+/code Make the AI response stream
# 2024-12-11 19:12:54.442146
+/code Make the input a bit wider
# 2024-12-11 19:14:21.073411
+/commit
# 2024-12-11 19:14:54.975812
+/add src/renderer/src/components/settings-dialog.tsx
# 2024-12-11 19:15:05.102470
+/add src/renderer/src/App.tsx
# 2024-12-11 19:15:14.911975
+/add src/renderer/src/Layout.tsx
# 2024-12-11 19:15:49.188228
+/code When I switch the theme on system level, the app doesn't switch themes automatically despite it being on "System", it only switches if i reload the app
# 2024-12-11 19:16:26.974103
+/undo
# 2024-12-11 19:17:16.153481
+/code Move the ThemeProvider to be in the layout, and put the layout at the top level
# 2024-12-11 19:19:39.669395
+/commit
# 2024-12-11 21:31:52.346007
+/clear
# 2024-12-11 21:31:59.333927
+/add src/renderer/src/components/app-sidebar.tsx
# 2024-12-11 21:32:13.651728
+/add src/renderer/src/components/FindInPage.tsx
# 2024-12-11 21:32:41.430842
+/add src/main/index.ts
# 2024-12-11 21:33:04.181654
+/code Can you please create a shortcut to trigger "reading mode" using an IPC call in the index.ts?
# 2024-12-11 21:33:27.037148
+/code Can you please create a shortcut to trigger "reading mode" using an IPC call in the index.ts? ONLY EDIT INDEX.TS
# 2024-12-11 21:35:05.202293
+/code Awesome! Now, when the reading mode is triggered it must do a jotai isenabled state, and must hide the webview of the active tab with a div that says "reader mode"
# 2024-12-11 21:37:46.409333
+/code I only want reader mode to be activated with the current tab, so when I switch tabs it must go back to their webview, and if i switch to the tab with reader mode enabled it shows it again
# 2024-12-11 21:38:12.541262
+/code ncaught ReferenceError: setIsReadingMode is not defined
+ at Tab.tsx:46:7
+ at renderWithHooks (chunk-KDCVS43I.js?v=396b68dd:11596:26)
+ at updateFunctionComponent (chunk-KDCVS43I.js?v=396b68dd:14630:28)
+ at updateSimpleMemoComponent (chunk-KDCVS43I.js?v=396b68dd:14511:18)
+ at updateMemoComponent (chunk-KDCVS43I.js?v=396b68dd:14414:22)
+ at beginWork (chunk-KDCVS43I.js?v=396b68dd:16025:22)
+ at HTMLUnknownElement.callCallback2 (chunk-KDCVS43I.js?v=396b68dd:3680:22)
+ at Object.invokeGuardedCallbackDev (chunk-KDCVS43I.js?v=396b68dd:3705:24)
+ at invokeGuardedCallback (chunk-KDCVS43I.js?v=396b68dd:3739:39)
+ at beginWork$1 (chunk-KDCVS43I.js?v=396b68dd:19818:15)
+2chunk-KDCVS43I.js?v=396b68dd:14080 The above error occurred in one of your React components:
+
+ at http://localhost:5173/src/components/Tab.tsx?t=1733953076458:27:45
+ at div
+ at div
+ at TabProvider (http://localhost:5173/src/providers/TabProvider.tsx:65:31)
+ at main
+ at _c9 (http://localhost:5173/src/components/ui/sidebar.tsx:409:12)
+ at div
+ at Provider (http://localhost:5173/@fs/Users/kyandesutter/Developer/formalsurf-refactor/node_modules/.vite/deps/chunk-PWONFZYQ.js?v=396b68dd:58:15)
+ at TooltipProvider (http://localhost:5173/@fs/Users/kyandesutter/Developer/formalsurf-refactor/node_modules/.vite/deps/@radix-ui_react-tooltip.js?v=396b68dd:83:5)
+ at http://localhost:5173/src/components/ui/sidebar.tsx:51:7
+ at ThemeProvider (http://localhost:5173/src/components/theme-provider.tsx:24:33)
+ at BaseLayout (http://localhost:5173/src/Layout.tsx?t=1733944745947:25:38)
+ at App (http://localhost:5173/src/App.tsx?t=1733953076458:32:27)
+
+Consider adding an error boundary to your tree to customize error handling behavior.
+Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
+logCapturedError @ chunk-KDCVS43I.js?v=396b68dd:14080
+Show 1 more frame
+Show less
+chunk-KDCVS43I.js?v=396b68dd:19466 Uncaught ReferenceError: setIsReadingMode is not defined
+ at Tab.tsx:46:7
+ at renderWithHooks (chunk-KDCVS43I.js?v=396b68dd:11596:26)
+ at updateFunctionComponent (chunk-KDCVS43I.js?v=396b68dd:14630:28)
+ at updateSimpleMemoComponent (chunk-KDCVS43I.js?v=396b68dd:14511:18)
+ at updateMemoComponent (chunk-KDCVS43I.js?v=396b68dd:14414:22)
+ at beginWork (chunk-KDCVS43I.js?v=396b68dd:16025:22)
+ at beginWork$1 (chunk-KDCVS43I.js?v=396b68dd:19806:22)
+ at performUnitOfWork (chunk-KDCVS43I.js?v=396b68dd:19251:20)
+ at workLoopSync (chunk-KDCVS43I.js?v=396b68dd:19190:13)
+ at renderRootSync (chunk-KDCVS43I.js?v=396b68dd:19169:15)
# 2024-12-11 21:38:15.577285
+n
# 2024-12-11 21:40:06.052515
+/code Awesome! Now put the reading mode view inside of a component in a new file
# 2024-12-11 21:40:49.981286
+/code Now make reader mode actually extract text from the website in it's tab
# 2024-12-11 21:42:11.010295
+/code If I switch back to the tab, the reader mode shows the content of the tab i came from despite that tab not having reader mode enabled
# 2024-12-11 21:43:31.975552
+/code It still breaks when switching tabs. The reading mode must keep in track from what tab the reading mode was enabled from, and only modify that webview
# 2024-12-11 21:44:15.015588
+/code reading mode breaks now! Uncaught ReferenceError: activeTab is not defined
+ at ReadingMode (ReadingMode.tsx:39:7)
+ at renderWithHooks (chunk-KDCVS43I.js?v=396b68dd:11596:26)
+ at mountIndeterminateComponent (chunk-KDCVS43I.js?v=396b68dd:14974:21)
+ at beginWork (chunk-KDCVS43I.js?v=396b68dd:15962:22)
+ at HTMLUnknownElement.callCallback2 (chunk-KDCVS43I.js?v=396b68dd:3680:22)
+ at Object.invokeGuardedCallbackDev (chunk-KDCVS43I.js?v=396b68dd:3705:24)
+ at invokeGuardedCallback (chunk-KDCVS43I.js?v=396b68dd:3739:39)
+ at beginWork$1 (chunk-KDCVS43I.js?v=396b68dd:19818:15)
+ at performUnitOfWork (chunk-KDCVS43I.js?v=396b68dd:19251:20)
+ at workLoopSync (chunk-KDCVS43I.js?v=396b68dd:19190:13)
+ReadingMode @ ReadingMode.tsx:39
+renderWithHooks @ chunk-KDCVS43I.js?v=396b68dd:11596
+mountIndeterminateComponent @ chunk-KDCVS43I.js?v=396b68dd:14974
+beginWork @ chunk-KDCVS43I.js?v=396b68dd:15962
+callCallback2 @ chunk-KDCVS43I.js?v=396b68dd:3680
+invokeGuardedCallbackDev @ chunk-KDCVS43I.js?v=396b68dd:3705
+invokeGuardedCallback @ chunk-KDCVS43I.js?v=396b68dd:3739
+beginWork$1 @ chunk-KDCVS43I.js?v=396b68dd:19818
+performUnitOfWork @ chunk-KDCVS43I.js?v=396b68dd:19251
+workLoopSync @ chunk-KDCVS43I.js?v=396b68dd:19190
+renderRootSync @ chunk-KDCVS43I.js?v=396b68dd:19169
+performConcurrentWorkOnRoot @ chunk-KDCVS43I.js?v=396b68dd:18728
+workLoop @ chunk-KDCVS43I.js?v=396b68dd:197
+flushWork @ chunk-KDCVS43I.js?v=396b68dd:176
+performWorkUntilDeadline @ chunk-KDCVS43I.js?v=396b68dd:384
+processImmediate @ node:internal/timers:483
+Show 14 more frames
+Show less
+ReadingMode.tsx:39 Uncaught ReferenceError: activeTab is not defined
+ at ReadingMode (ReadingMode.tsx:39:7)
+ at renderWithHooks (chunk-KDCVS43I.js?v=396b68dd:11596:26)
+ at mountIndeterminateComponent (chunk-KDCVS43I.js?v=396b68dd:14974:21)
+ at beginWork (chunk-KDCVS43I.js?v=396b68dd:15962:22)
+ at HTMLUnknownElement.callCallback2 (chunk-KDCVS43I.js?v=396b68dd:3680:22)
+ at Object.invokeGuardedCallbackDev (chunk-KDCVS43I.js?v=396b68dd:3705:24)
+ at invokeGuardedCallback (chunk-KDCVS43I.js?v=396b68dd:3739:39)
+ at beginWork$1 (chunk-KDCVS43I.js?v=396b68dd:19818:15)
+ at performUnitOfWork (chunk-KDCVS43I.js?v=396b68dd:19251:20)
+ at workLoopSync (chunk-KDCVS43I.js?v=396b68dd:19190:13)
+ReadingMode @ ReadingMode.tsx:39
+renderWithHooks @ chunk-KDCVS43I.js?v=396b68dd:11596
+mountIndeterminateComponent @ chunk-KDCVS43I.js?v=396b68dd:14974
+beginWork @ chunk-KDCVS43I.js?v=396b68dd:15962
+callCallback2 @ chunk-KDCVS43I.js?v=396b68dd:3680
+invokeGuardedCallbackDev @ chunk-KDCVS43I.js?v=396b68dd:3705
+invokeGuardedCallback @ chunk-KDCVS43I.js?v=396b68dd:3739
+beginWork$1 @ chunk-KDCVS43I.js?v=396b68dd:19818
+performUnitOfWork @ chunk-KDCVS43I.js?v=396b68dd:19251
+workLoopSync @ chunk-KDCVS43I.js?v=396b68dd:19190
+renderRootSync @ chunk-KDCVS43I.js?v=396b68dd:19169
+recoverFromConcurrentError @ chunk-KDCVS43I.js?v=396b68dd:18786
+performConcurrentWorkOnRoot @ chunk-KDCVS43I.js?v=396b68dd:18734
+workLoop @ chunk-KDCVS43I.js?v=396b68dd:197
+flushWork @ chunk-KDCVS43I.js?v=396b68dd:176
+performWorkUntilDeadline @ chunk-KDCVS43I.js?v=396b68dd:384
+processImmediate @ node:internal/timers:483
+Show 15 more frames
+Show less
+node:internal/timers:483 The above error occurred in the <ReadingMode> component:
+
+ at ReadingMode (http://localhost:5173/src/components/ReadingMode.tsx?t=1733953424251:20:3)
+ at div
+ at http://localhost:5173/src/components/Tab.tsx?t=1733953438181:28:45
+ at div
+ at div
+ at TabProvider (http://localhost:5173/src/providers/TabProvider.tsx:65:31)
+ at main
+ at _c9 (http://localhost:5173/src/components/ui/sidebar.tsx:409:12)
+ at div
+ at Provider (http://localhost:5173/@fs/Users/kyandesutter/Developer/formalsurf-refactor/node_modules/.vite/deps/chunk-PWONFZYQ.js?v=396b68dd:58:15)
+ at TooltipProvider (http://localhost:5173/@fs/Users/kyandesutter/Developer/formalsurf-refactor/node_modules/.vite/deps/@radix-ui_react-tooltip.js?v=396b68dd:83:5)
+ at http://localhost:5173/src/components/ui/sidebar.tsx:51:7
+ at ThemeProvider (http://localhost:5173/src/components/theme-provider.tsx:24:33)
+ at BaseLayout (http://localhost:5173/src/Layout.tsx?t=1733944745947:25:38)
+ at App (http://localhost:5173/src/App.tsx?t=1733953438181:32:27)
+
+Consider adding an error boundary to your tree to customize error handling behavior.
+Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
+logCapturedError @ chunk-KDCVS43I.js?v=396b68dd:14080
+update.callback @ chunk-KDCVS43I.js?v=396b68dd:14100
+callCallback @ chunk-KDCVS43I.js?v=396b68dd:11296
+commitUpdateQueue @ chunk-KDCVS43I.js?v=396b68dd:11313
+commitLayoutEffectOnFiber @ chunk-KDCVS43I.js?v=396b68dd:17141
+commitLayoutMountEffects_complete @ chunk-KDCVS43I.js?v=396b68dd:18030
+commitLayoutEffects_begin @ chunk-KDCVS43I.js?v=396b68dd:18019
+commitLayoutEffects @ chunk-KDCVS43I.js?v=396b68dd:17970
+commitRootImpl @ chunk-KDCVS43I.js?v=396b68dd:19406
+commitRoot @ chunk-KDCVS43I.js?v=396b68dd:19330
+finishConcurrentRender @ chunk-KDCVS43I.js?v=396b68dd:18813
+performConcurrentWorkOnRoot @ chunk-KDCVS43I.js?v=396b68dd:18768
+workLoop @ chunk-KDCVS43I.js?v=396b68dd:197
+flushWork @ chunk-KDCVS43I.js?v=396b68dd:176
+performWorkUntilDeadline @ chunk-KDCVS43I.js?v=396b68dd:384
+processImmediate @ node:internal/timers:483
+Show 15 more frames
+Show less
+chunk-KDCVS43I.js?v=396b68dd:19466 Uncaught ReferenceError: activeTab is not defined
+ at ReadingMode (ReadingMode.tsx:39:7)
+ at renderWithHooks (chunk-KDCVS43I.js?v=396b68dd:11596:26)
+ at mountIndeterminateComponent (chunk-KDCVS43I.js?v=396b68dd:14974:21)
+ at beginWork (chunk-KDCVS43I.js?v=396b68dd:15962:22)
+ at beginWork$1 (chunk-KDCVS43I.js?v=396b68dd:19806:22)
+ at performUnitOfWork (chunk-KDCVS43I.js?v=396b68dd:19251:20)
+ at workLoopSync (chunk-KDCVS43I.js?v=396b68dd:19190:13)
+ at renderRootSync (chunk-KDCVS43I.js?v=396b68dd:19169:15)
+ at recoverFromConcurrentError (chunk-KDCVS43I.js?v=396b68dd:18786:28)
+ at performConcurrentWorkOnRoot (chunk-KDCVS43I.js?v=396b68dd:18734:30)
# 2024-12-11 21:44:19.866173
+S
# 2024-12-11 21:45:19.749393
+/code That works amazingly! Now, if I go out of reading mode it must refresh the tab due to the injected JS breaking the page
# 2024-12-11 21:46:21.944847
+/code Awesome! Now make it so that like the FindInPage, the reading mode uses prose
# 2024-12-11 21:47:57.054156
+/code If possible, the reading view must still display headings, links, etc. if it was on the original page too
# 2024-12-11 21:51:10.881311
+/code Make the reader view automatically ignore headers, footers
# 2024-12-11 21:52:49.719301
+/undo
# 2024-12-11 21:53:58.051085
+/code Can it theoretically get the cleaontent.innerHTML, send it to the GPT API, and display that?
# 2024-12-11 21:55:44.965502
+/code Make it use streaming instead of a loading spinner
# 2024-12-11 21:58:24.133265
+/code I just see "Processing content..." and no streaming, nor do I ever get a result
# 2024-12-11 21:58:39.396112
+/code I just see "Processing content..." and no streaming, nor do I ever get a result USE GPT-4o
# 2024-12-11 21:59:50.102842
+/add src/renderer/src/atoms/reading-mode.ts
# 2024-12-11 21:59:54.629925
+/add src/renderer/src/components/ReadingMode.tsx
# 2024-12-11 21:59:57.335586
+/code I just see "Processing content..." and no stream
+ing, nor do I ever get a result USE GPT-4o
+
# 2024-12-11 22:00:49.063597
+/code REVERT IT TO gpt-4o IT IS BETTER THAN NORMAL 4
# 2024-12-11 22:03:14.443340
+/code remove the whole GPT implementation, and use mozilla's readability.js instead
# 2024-12-11 22:04:30.638512
+/code remove the whole GPT implementation
# 2024-12-11 22:05:38.107303
+/code Now implement readability.js
# 2024-12-11 22:06:17.195839
+n
# 2024-12-11 22:07:35.492891
+/code the webview's injected JS cannot access the readability API, instead you must have the parsedContent variable just return the document, and then reader.parse the variable
# 2024-12-11 22:08:56.008604
+/commit
# 2024-12-12 09:19:23.204133
+/add src/renderer/src/components/ReadingMode.tsx
# 2024-12-12 09:19:43.186937
+/code Can you please put the extract content into a reusable function in src/lib/?
# 2024-12-12 09:20:49.180278
+/add src/renderer/src/components/FindInPage.tsx
# 2024-12-12 09:21:32.370787
+/code Now, reuse the extractreadablecontent function inside of the findinpage AI feature, so that instead of sending the whole page it just sends the readable content
# 2024-12-29 18:27:50.809186
+/add src/renderer/src/components/FindInPage.tsx
# 2024-12-29 18:28:43.725989
+/ask This AI call is with stream off and is now to an ollama server, not openAI. please refactor the response handling to not use streaming and display the response of the ollama API call instead
# 2024-12-29 18:29:13.513922
+/code This AI call is with stream off and is now to an ollama server, not openAI. please refactor th
+e response handling to not use streaming and display the response of the ollama API call instead
+
# 2024-12-30 10:05:36.287282
+/add src/renderer/src/components/Tab.tsx
# 2024-12-30 10:05:39.770640
+/add src/renderer/src/components/NewTab.tsx
# 2024-12-30 10:05:55.640423
+/add src/renderer/src/atoms/history.ts
# 2024-12-30 10:06:20.993448
+/code Can you improve my history system to include tab ID's, and to update properly
# 2024-12-30 10:07:20.426658
+/code Turn the sethistory into a reusable function please
# 2024-12-30 10:09:24.430104
+/code I get a bunch of duplicate entries, and history doesn't seem to always get updated
# 2024-12-30 10:12:04.634515
+/code instead of putting the history in the NewTab.tsx create a separate screen that appears similarly to the readingmode component in the tab
# 2024-12-30 10:14:15.004906
+/add src/renderer/src/App.tsx
# 2024-12-30 10:14:20.990061
+/add src/main/index.ts
# 2024-12-30 10:14:39.780402
+/code add a shortcut similar to the reading mode to trigget the history true/false
# 2024-12-30 10:29:51.453310
+/code Please add a search function to this using the shadcn input