David Dworken
c1729f1ee2
Add ability to configure custom OpenAI API endpoint for #186 ( #194 )
...
* Add ability to configure custom OpenAI API endpoint for #186
* Ensure the AiCompletionEndpoint field is always initialized
2024-08-11 12:29:37 -07:00
David Dworken
f11433fb98
Add explicit handling for 429 error code from OpenAI
2024-08-11 12:29:36 -07:00
David Dworken
d27c3cd8e4
Log OpenAI error to debug log for #167
2024-08-11 12:29:36 -07:00
David Dworken
7c07236dc0
Revert "Swap to using iterators for uploading to avoid storing all chunks in memory"
...
This reverts commit 632ecc5c81
.
2024-02-04 22:19:11 -08:00
David Dworken
ed583c36a3
Chunk uploads for reuploading
2024-02-04 21:44:00 -08:00
David Dworken
632ecc5c81
Swap to using iterators for uploading to avoid storing all chunks in memory
2024-02-04 21:03:39 -08:00
David Dworken
80454d3859
Add more debugging info when OpenAI API returns zero responses for #167
2024-02-04 17:32:20 -08:00
David Dworken
17b158d4b3
Swap to checking golden usage post-tests so that it covers all golden usages, and not just per-package
2023-12-22 08:04:10 -08:00
David Dworken
e5764c6f07
Update AssertAllGoldensUsed to use an allowlist of goldens that may not be referenced in GH actions
2023-12-22 06:51:21 -08:00
David Dworken
9f5453f710
Fix issue where we paniced because the colored TUI test goldens weren't used on linux
2023-12-21 18:31:29 -08:00
David Dworken
88f1c0168e
Move test goldens to testdata/ directory to be more idiomatic, and add assertion that they're all actively being used by the tests ( #154 )
...
* Move golden files to testdata dir
* Add assertion that requires that all goldens are used
* Add map init so the map is non-nil
* Add print to confirm that tests finished running
* Remove colon so that this doesn't match against gotestsum looking for the substring "panic:", which can happen depending on how stdout is buffer
* Revert "Remove colon so that this doesn't match against gotestsum looking for the substring "panic:", which can happen depending on how stdout is buffer"
This reverts commit b44e53a17b
.
2023-12-21 17:06:46 -08:00
David Dworken
3ce76d154a
Add timestamp to testlog
2023-12-20 19:41:00 -08:00
David Dworken
9b5a09f85e
Fix incorrect argument order
2023-12-19 20:51:02 -08:00
David Dworken
8fd809fdc8
Improve AI suggestions by specifying shell name and OS in OpenAI query
2023-12-19 20:50:29 -08:00
David Dworken
3a01e47701
Refactor: Move UsageData and Device to the backend/server directory since they are purely server-side constructs
2023-12-10 10:32:04 -08:00
David Dworken
7272ca8448
Delete data from backend when uninstalling, fixes #132 ( #143 )
2023-12-10 09:15:11 -08:00
David Dworken
8419a883b4
Normalize hostnames in goldens so that golden files work well for local tests too
2023-12-09 15:12:40 -08:00
David Dworken
acdcd9569a
Fix error checking so that if /tmp/test-goldens/ exists, then we don't error out
2023-12-03 16:58:31 -08:00
David Dworken
bdaf0f8a65
Make TUI always take exactly the full width of the terminal through more precise calculations of the overhead used for the table ( #136 )
...
* Make TUI always take exactly the full width of the terminal through more precise calculations of the overhead used for the table
* Update TUI goldens for more accurate TUI sizing
* More golden updates for wider table sizing
* Include failed test goldens as artifacts for easier test fixing on github actions
2023-12-03 13:15:38 -08:00
David Dworken
b928ff642f
Add additional error checking for server startup
2023-11-22 20:47:40 -08:00
David Dworken
0c2774ec15
Change deletion request code to not filter on DeviceId since the two device ID fields are not actually the same (see the newly added comment)
2023-11-22 20:44:57 -08:00
David Dworken
c52dbebb1b
Consolidate TODOs
2023-11-12 05:04:55 -08:00
David Dworken
034c317d74
Update prompt to discourage adding formatting
2023-11-12 04:54:37 -08:00
David Dworken
1a450c0817
Add basic sanity test to confirm that our interactions with the OpenAI API are correct
2023-11-12 02:57:23 -08:00
David Dworken
6962233e1e
Better log messages and error messages
2023-11-12 02:57:23 -08:00
David Dworken
afe1a38a0e
Fix 2d63263b79
by applying the override on the backend rather than in the client-side variable that isn't actually being referenced
2023-11-12 02:57:23 -08:00
David Dworken
b0f3107da2
Add basic test for AI queries
2023-11-12 02:57:23 -08:00
David Dworken
0ea3ce2399
Add basic debouncing for AI integration + implement AI suggestions via hishtory API endpoint
2023-11-12 02:57:23 -08:00
David Dworken
eb835fe52c
Add initial version of AI searching, but with a broken implementation of debouncing
2023-11-12 02:57:23 -08:00
David Dworken
390f37f20c
Update testTui tests to run with online and offline installs
2023-10-25 20:44:26 -07:00
David Dworken
9433bd6e94
Refactor offline simulation tests so that they reliably set the env variable before ever starting the shell, since we need the env variable to also apply to presaving
2023-10-22 11:28:41 -07:00
David Dworken
f3727dbeff
Wire through a flag so that we can track when installations come from tests, and delete those from the DB more aggressively
2023-10-15 13:09:48 -07:00
David Dworken
56f54f0f65
Better output formatting for server failures
2023-10-15 12:48:05 -07:00
David Dworken
6fb6498515
Make deletion request processing happen in parallel to speed up query endpoint
2023-10-14 17:21:00 -07:00
David Dworken
f0dbcd6e3b
Add more thorough tests for updates
2023-10-09 21:41:30 -07:00
David Dworken
d2788a9f31
Swap interface{} to any
2023-10-07 15:11:49 -07:00
David Dworken
d33bd6a046
Improve history import performance so that we can import 100k entries in ~6 seconds (down from ~20 seconds)
2023-10-02 22:27:24 -07:00
David Dworken
0b57034c39
Revert "Revert all commits since v0.223 to enable me to release a patch on top of v0.223"
...
This reverts commit 68ed9f2d5d
.
2023-09-29 18:21:23 -07:00
David Dworken
68ed9f2d5d
Revert all commits since v0.223 to enable me to release a patch on top of v0.223
2023-09-28 22:15:30 -07:00
David Dworken
7e33e942e6
Delete no longer used function
2023-09-28 22:14:35 -07:00
David Dworken
9fda54d4c2
Remove testutils.Check(t, err) and replace it with require.NoError which gives a clearer error message and a full stacktrace
2023-09-28 22:13:27 -07:00
David Dworken
6d5a86a8bb
Revert all commits since v0.223 to enable me to release a patch on top of v0.223
2023-09-28 21:49:37 -07:00
David Dworken
0c202e4130
Delete no longer used function
2023-09-24 18:09:41 -07:00
David Dworken
5121df5a8c
Remove testutils.Check(t, err) and replace it with require.NoError which gives a clearer error message and a full stacktrace
2023-09-24 16:05:01 -07:00
David Dworken
cc11916f3c
Create func to automatically create DB indexes rather than just documenting them in a comment that has to be manually executed
2023-09-22 19:11:43 -07:00
David Dworken
51f2c15f35
Add index for deletion requests now that the volume of deletion requests will increase
2023-09-22 19:01:27 -07:00
David Dworken
1d878195b2
Rework ff98a7907c
to use the newly added EntryId column rather than deleting based on the start time
2023-09-22 14:03:41 -07:00
David Dworken
9b847c5e35
Further optimize client-server roundtrips by including deletion and dump requests in submit responses (follow up to 1e43de689f
)
2023-09-22 13:49:29 -07:00
David Dworken
a5f11af150
Add initial code to support unique per-entry IDs
...
This code has two caveats for old entries:
1. the ID is being backfiled with a random per-(device,entry) ID. So the ID won't match cross-device.
2. the server-side ID will still be a random ID that is unrelated to the entry ID
2023-09-22 13:16:24 -07:00
David Dworken
2a5a6d65c4
Roll-forward "Add preliminary support for persisting pre-saved history entries remotely"
...
This rolls-forward commit 66916c27cb
.
2023-09-22 13:13:46 -07:00