David Dworken
389515ae28
Add support for full-screen rendering ( #258 )
2024-10-19 13:11:34 -07:00
David Dworken
c8c1523683
Update test goldens + drop duplicate macos version from go tests
2024-08-25 16:04:55 -07:00
David Dworken
24f69ca29d
Limit max number of log files kept for #219 -- So far we haven't had any use cases for historical logs for debugging, so this probably isn't needed
2024-08-25 15:16:09 -07:00
David Dworken
3875bddddc
Add ability to configure log-level and update many log lines to use the correct log level, fixes #211 #219
2024-08-25 11:50:46 -07:00
Pavel Griaznov
8da11eb3fa
run "make fmt" ( #233 )
2024-08-11 12:19:41 -07:00
David Dworken
820e3b8567
Update incorrect docs on ClientConfig struct
2024-08-11 12:01:51 -07:00
Pavel Griaznov
25cb7dddab
add forceComapctMode config entry ( #237 )
2024-08-11 11:37:48 -07:00
David Dworken
c933cbc792
Add support for custom key bindings for #190 ( #209 )
...
* Add support for custom key bindings for #190
* Add tests for configuring custom key bindings
* Simplify key bindings test
* Add docs on custom key bindings + error message for unhandled actions
2024-04-28 13:50:09 -07:00
David Dworken
ba21e1c2dd
Add index of start time so that queries with a LIMIT clause can avoid a full table scan (for #202 )
2024-04-14 10:19:46 -07:00
David Dworken
21b401bc14
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-03-26 22:13:57 -07:00
David Dworken
a3f1282368
Add ability to configure a default filter (for #76 ) ( #161 )
...
* Add ability to configure a default filter (for #76 )
* Add test for color of default filter
* Add basic test for default filter
* Add goldens for tests
* Add more tests for default filters
* Update goldens
* Add another golden
* Update goldens
* Remove debug log
* Add golden to allowlist
* Update goldens
2024-01-07 21:06:22 -08:00
David Dworken
8b7e54eab4
Add support for configuring the TUI color scheme, for #134 ( #146 )
...
* Add support for configuring the TUI color scheme, for #134
* Add tests for getting and setting the custom color scheme, and support full colors where terminals support them
* Add comments to document termenv.ANSI setting, and fix tests so they work uniformly
2023-12-18 20:32:11 -08:00
David Dworken
b3e145d764
Enable presaving by default rather than having it gated behind BetaMode
2023-11-24 16:46:22 -08:00
David Dworken
0be6fe9724
Swap AI completions to be behind a dedicated config option and add docs on it
2023-11-12 03:09:56 -08:00
David Dworken
fca2b1441f
Always include user and device ID in API request headers, so that they're available in all server-side handlers
2023-10-14 10:52:51 -07:00
David Dworken
253ad7f6b6
Bold matches for search queries in TUI for #112 . This was previously available behind the beta-mode flag, but will now be enabled by default
2023-10-12 19:34:09 -07:00
David Dworken
2c77c3d9c9
Fix bug with bash presaving that caused commands to not get properly recorded due to presaving looking like a duplicate command
2023-09-29 21:03:12 -07:00
David Dworken
3253883198
Fix syncing consistency bug, but with the caveat that there is currently no easy/practical way to write tests for this
2023-09-23 19:57:41 -07:00
David Dworken
ab12fa4d47
Fix consistency bug where ClientConfig would get out of date between different parts of the code
2023-09-23 12:40:57 -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
aebf526d1f
Add TODO for a theoretical bug I noticed
2023-09-12 17:51:55 -07:00
David Dworken
c5bdee9ad5
Merge pull request #102 from lsmoura/sergio/no-ctx-ptr
...
Remove context pointers since there is no need to pass around a pointer to an interface
2023-09-06 19:58:08 -07:00
Sergio Moura
ce6484f465
constant context keys
2023-09-05 15:54:47 -04:00
Sergio Moura
a12b0e5f6f
no context pointers
2023-09-05 15:45:17 -04:00
Sergio Moura
83ad8c7b1f
wrap errors with %w instead of using %v
2023-09-05 15:08:55 -04:00
David Dworken
25ec191f1a
Implement pre-saving feature to ensure that long-running/non-terminating commands are saved in hishtory
2023-08-27 14:24:59 -07:00
David Dworken
dc65fffd7b
Add an index on end_time to ensure that initial queries are fast to fix #68
2023-02-18 22:26:18 -08:00
David Dworken
f8b51e49da
Support customizing HISHTORY_PATH for people who want to install hishtory in an alternate location to fix #54
2022-12-16 22:22:57 -08:00
David Dworken
b7533479a3
Fix config corruption bug caused by parallel writes to the same tmp file to fix #47
2022-12-11 19:15:29 -08:00
David Dworken
35444bf56e
Swap ioutil to non-deprecated alternatives + clean up pre-commit errors
2022-11-27 11:59:06 -08:00
David Dworken
86f9d67aff
Fix test failures caused by the cobra install command not respecting the secret key
...
Also added a persistLog() function so that I can easily inspect the hishtory logs from test runs.
2022-11-16 20:28:25 -08:00
David Dworken
49a1035169
Fix flakey test failures by removing cache=shared which is a discouraged mode ( https://www.sqlite.org/sharedcache.html ). WAL is sufficient for our purposes. Plus fix a bug where the TUI would go into an infinite loop if there were zero results.
2022-11-15 23:20:19 -08:00
David Dworken
e3a793c753
Specify WAL when opening the sqlite file to defend against deadlocks
2022-11-12 06:39:37 -08:00
David Dworken
e72ef668ea
Add custom timestamp format as requested in the original HN thread
2022-11-11 17:17:54 -08:00
David Dworken
9c47afbe54
Add TODOs
2022-11-11 17:03:32 -05:00
David Dworken
21a7a48afb
Migrate to logrus so we can auto-rotate the log file
2022-11-09 16:14:44 -08:00
David Dworken
6dea8a989e
Add config option to filter out duplicate history entries as requested in #10
2022-11-03 20:36:36 -07:00
David Dworken
185d2739c7
Add offline mode for hiSHtory
2022-11-03 13:16:45 -07:00
David Dworken
cdc5421a7b
Move testutils to a separate package so as to move test-only code out of the main binary
2022-10-27 21:53:47 -07:00
David Dworken
12163483dd
Add data types for custom columns
2022-10-23 21:42:22 -07:00
David Dworken
51b41aa171
Add custom columns to config + use them in the non-TUI query
2022-10-23 20:54:46 -07:00
David Dworken
ebf8de2b1f
Refactor to enable control-r by default on upgrade + pave the way for prompts in the future
2022-10-23 19:29:29 -07:00
David Dworken
253f2fdc27
Enable control-r binding for new installs + prompt upgrades on whether they want to enable control-r bindings
2022-10-23 16:51:39 -07:00
David Dworken
aa3f449885
Skip recording empty history commands
2022-10-23 15:40:30 -07:00
David Dworken
f337d7affd
Add a new field to the config for enabling control-r search and add undocumented commands to toggle this field from the CLI
2022-10-16 09:29:14 -07:00
David Dworken
bb36a30ded
Avoid partial file writes by writing to a tmp file and then renaming
2022-10-14 16:42:47 -07:00
David Dworken
8002c5e942
Add homedir to context
2022-09-21 20:19:11 -07:00
David Dworken
fb401dab88
Resume using the modernc.org sqlite driver so it works with CGO_ENABLED=0
2022-09-21 19:49:24 -07:00
David Dworken
ceb1becfa6
Fix ctx wiring so installs work properly
2022-09-20 23:30:57 -07:00
David Dworken
694c2e2679
Untested: ctx wired through
2022-09-20 22:28:40 -07:00