Commit Graph

8 Commits

Author SHA1 Message Date
239ded18f3 Add edit command
Various refactoring:
- reduced repetition with conversation message handling
- made some functions internal
2024-01-02 04:31:21 +00:00
cb9e27542e Add --system-prompt and --system-prompt-file flags
These allow to set a different system prompt for conversations and
one-shot prompts.

Also add a new `modelDefaults.systemPrompt` configuration key to define
the default system prompt, which can be overriden per-execution with the
--system-prompt or --system-prompt-file flags.
2023-11-22 04:45:06 +00:00
8780856854 Set config defaults using a "default" struct tag
Add new SetStructDefaults function to handle the "defaults" struct tag.

Only works on struct fields which are pointers (in order to be able to
distinguish between not set (nil) and zero values). So, the Config
struct has been updated to use pointer fields and we now need to
dereference those pointers to use them.
2023-11-19 04:37:14 +00:00
b0a1299e0b Implement lmcli ls 2023-11-12 14:30:42 -07:00
1ac8f7d046 Trim content before returning InputFromEditor 2023-11-05 07:22:45 +00:00
6465ce5146 Trim placeholder from input via InputFromEditor 2023-11-04 22:52:48 +00:00
04478cbbd1 Refactor store and config handling
- Moved global `store` and `config` variables to cli.go
- Add Fatal() function for outputting an error and exiting
2023-11-04 14:22:16 -06:00
16454a0bbd Project restructure
Moved source files into cmd/ and pkg/ directories
2023-11-04 13:35:23 -06:00