summaryrefslogtreecommitdiffstats
path: root/src/main.rs
AgeCommit message (Collapse)AuthorLines
2024-01-13feat: supports model capabilities (#297)sigoden-2/+3
1. automatically switch to the model that has the necessary capabilities. 2. throw an error if the client does not have a model with the necessary capabilities
2023-11-27feat: support vision (#249)sigoden-9/+20
* feat: support vision * clippy * implement vision * resolve data url to local file * add model openai:gpt-4-vision-preview * use newline to concate embeded text files * set max_tokens for gpt-4-vision-preview
2023-11-08refactor: improve code quanity (#238)sigoden-5/+0
2023-11-08refactor: improve render (#235)sigoden-29/+27
* refactor: redesign render - if stdout is not terminal, just write reply text to stdout - rename repl_render_stream to markdown_stream - deprecate cmd_render_stream - use raw_stream to just print streaming reply text * optimize rendering error * optimize render_stream
2023-11-07feat: add `config.prelude` to allow setting default role/session (#224)sigoden-0/+1
2023-11-07refactor: use &GlobalConfig to avoid clone (#217)sigoden-4/+4
2023-11-02refactor: optimize render (#202)sigoden-0/+3
2023-11-02refactor: improve repl completer (#199)sigoden-4/+4
2023-11-02refactor: improve code quanity (#197)sigoden-5/+5
- move model_info.rs/message.rs to clients/ - rename SharedConfig to GlobalConfig
2023-11-02refactor: improve code quanity (#196)sigoden-13/+9
- rewrite Repl, remove ReplHandler - move ReplyStreamHandler to repl/ and rename it to ReplyHandler - deprecate utils::print_now - refactor session info
2023-11-01refactor: improve code quanity (#194)sigoden-4/+4
- extends ModelInfo for tokens calculating - refactor config/session.rs, improve export, render, getter/setter - modify main.rs, allow --model override session.model
2023-11-01refactor: clients/* and config.rs (#193)sigoden-2/+2
- add register_clients macro to make it easier to add a new client - no create_client_config, just add const PROMPTS - move ModelInfo from clients/ to config/ - model's max_tokens are optional - improve code quanity on config/mod.rs - add/use macro config_get_fn
2023-10-31feat: support custom theme (#187)sigoden-1/+1
2023-10-30feat: add `.info role` and `.info session` (#183)sigoden-1/+1
2023-10-30chore: spellchecksigoden-2/+2
2023-10-30feat: deprecate history file (#179)sigoden-1/+0
2023-10-30fix: bugs between sesison/role (#178)sigoden-14/+7
2023-10-30feat: deprecate prompt, remove `--prompt` and `.prompt` (#176)sigoden-3/+0
2023-10-30feat: show role info with `--role <name> --info` (#175)sigoden-0/+2
2023-10-30feat: support textwrap (#171)sigoden-7/+6
* feat: support textwrap * improve cmd_render_stream * done cmd_render_stream * add `-w` alias to `--wrap` * done repl_render_stream * add `config.wrap_code` * remove cached config.wrap_width * fix unxpected duplicate lines on kitty * refactor markdown render * improve render * fix test
2023-10-29feat: add `--light-theme` option (#169)sigoden-0/+3
2023-10-29fix: unexpcted duplicate lines in kitty (#167)sigoden-1/+1
2023-10-28feat: enhance session/conversation (#162)sigoden-7/+21
* feat: enhance session/conversation * updates * updates * cut version v0.9.0-rc2 * add .session name completion
2023-10-27chore: replace atty with is-terminal (#156)sigoden-6/+6
2023-10-26refactor: improve code quanitysigoden-14/+5
remove tokio::runtime::Runtime from client
2023-10-26feat: support multi bots and custom url (#150)sigoden-9/+19
2023-07-10fix: minor code cleanup and pedantic lints (#134)Anthony Rubick-8/+8
2023-03-20feat: add `--dry-run` (#83)sigoden-0/+3
2023-03-20feat: check token usage in dry_run mode (#82)sigoden-0/+1
2023-03-20feat: add `--info` (#79)sigoden-0/+5
2023-03-16feat: support multiple models (#71)sigoden-0/+9
2023-03-13chore: optimzie role argssigoden-1/+1
2023-03-11feat: add support for NO_COLOR (#67)sigoden-20/+14
2023-03-11feat: support light theme (#65)sigoden-2/+11
There are two ways to enable the light theme: - add `light_theme: true` to config.yaml - use `AICHAT_LIGHT_THEME=true` env var
2023-03-11feat: provide `--prompt` for adding a prompt from cli (#62)sigoden-0/+3
2023-03-10fix: cli specify role is not applied when conversation_first set true (#57)sigoden-0/+1
close #56
2023-03-09feat: add remain tokens indicator and max tokens guard (#50)sigoden-0/+2
2023-03-09refactor: imports order and groupsigoden-9/+8
2023-03-09refactor: replace Arc<Refcell<Config>> with Arc<Mutex<Config>> (#46)sigoden-8/+8
2023-03-08chore: optimize newline again (#43)sigoden-2/+2
* chore: optimize newline again command mode: should no extra newline chat mode: should have one newline * fix windows newline * fix macos newline
2023-03-08chore: improve code by getting prompt from config (#39)sigoden-3/+2
2023-03-08chore: optimize output newlinesigoden-2/+2
2023-03-08refactor: replace dump with print_now! (#35)sigoden-0/+1
2023-03-08fix: repl set save true not work if not rerun(#34)sigoden-2/+1
2023-03-07feat: command mode supports stream out (#31)sigoden-14/+34
* feat: command mode supports stream out * update cli
2023-03-07refactor: adjust repl (#30)sigoden-1/+1
- abandon .copy - rename .multiple => .editor - if command successed, do not output `Done` - if command failed, output `Error: <error message>`
2023-03-07refactor: use syntect for highlight, abandon mdcat (#26)sigoden-2/+2
* refactor: use syntect for highlight, abandon mdcat * split src/render.rs to sub modules. embed a default theme * simulate typing effect. * fix format
2023-03-06chore: improve code by renameing some functionsigoden-1/+1
2023-03-06feat: add `--no-highlight` option (#24)sigoden-1/+3
2023-03-06fix: combine pipe and cli args, disable highlight when pipe (#23)sigoden-3/+7