diff options
| author | sigoden <sigoden@gmail.com> | 2024-04-13 19:50:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 19:50:10 +0800 |
| commit | 1c3e81afe9f63fb47303384a82c7239458166f52 (patch) | |
| tree | 85d89be89fe9347cf4e8b8cbf30993e5d85c38f8 /scripts/completions/aichat.nu | |
| parent | 568e9a06db7189a28f9346802356b3fd4bdf921b (diff) | |
| download | aichat-1c3e81afe9f63fb47303384a82c7239458166f52.tar.gz | |
feat: add completion scripts (#411)
Diffstat (limited to 'scripts/completions/aichat.nu')
| -rw-r--r-- | scripts/completions/aichat.nu | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/scripts/completions/aichat.nu b/scripts/completions/aichat.nu new file mode 100644 index 0000000..19b382e --- /dev/null +++ b/scripts/completions/aichat.nu @@ -0,0 +1,50 @@ +module completions { + + def "nu-complete aichat completions" [] { + [ "bash" "zsh" "fish" "powershell" "nushell" ] + } + + def "nu-complete aichat model" [] { + ^aichat --list-models | + | lines + | parse "{value}" + } + + def "nu-complete aichat role" [] { + ^aichat --list-roles | + | lines + | parse "{value}" + } + + def "nu-complete aichat session" [] { + ^aichat --list-sessions | + | lines + | parse "{value}" + } + + # All-in-one chat and copilot CLI that integrates 10+ AI platforms + export extern aichat [ + --model(-m): string@"nu-complete aichat model" # Choose a LLM model + --role(-r): string@"nu-complete aichat role" # Choose a role + --session(-s): string@"nu-complete aichat role" # Create or reuse a session + --save-session # Whether to save the session + --execute(-e) # Execute commands using natural language + --code(-c) # Generate only code + --file(-f): string # Attach files to the message + --no-highlight(-H) # Disable syntax highlighting + --no-stream(-S) # No stream output + --wrap(-w): string # Specify the text-wrapping mode (no, auto, <max-width>) + --light-theme # Use light theme + --dry-run # Run in dry run mode + --info # Print related information + --list-models # List all available models + --list-roles # List all available roles + --list-sessions # List all available sessions + ...text: string # Input text + --help(-h) # Print help + --version(-V) # Print version + ] + +} + +export use completions * |
