callstack / ai-cli

AI assistant in your terminal.
https://callstack.github.io/ai-cli/
MIT License
21 stars 0 forks source link

`/save` command #14

Closed mdjastrzebski closed 6 months ago

mdjastrzebski commented 6 months ago

Is your feature request related to a problem? Please describe. Add ability to save conversation content to a file for future reference.

Describe the solution you'd like User should be able to invoke /save command to save the conversation to a default location. Optionally users should be able to provide an alternative location and or filename.

Describe alternatives you've considered A CLI option, however not always user is aware that the conversation is worth saving.

Example use cases

  1. No args

    me: /save
    Saved the conversation to "~/ai-chats/2024-02-22 12:15 Tell me a joke.txt".

    Default name would be date, time (hour + minute), then couple of first words from the query. ALl properly escaped, etc.

  2. Filename

    me: /save roman-empire.txt
    Saved the conversation to "~/ai-chats/roman-empire.txt".

2b. Filename name clash

me: /save roman-empire.txt
File "~/ai-chats/roman-empire.txt" already existed. Saved the conversation to "~/ai-chats/roman-empire-1.txt" instead.
  1. Full path
    me: /save ~/roman-empire.txt
    Saved the conversation to "~/roman-empire.txt".

Considerations Key params to think through (propose better values if you find any):

  1. Default name of saved file: 2024-02-22 12:15 Tell me a joke.txt
  2. Default save folder: ~/ai-chats