File tree Expand file tree Collapse file tree
src/aks-preview/azext_aks_preview/agent Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import uuid
1111from pathlib import Path
1212
13- import typer
1413from azure .cli .core .api import get_config_dir
1514from azure .cli .core .commands .client_factory import get_subscription_id
1615from knack .util import CLIError
1716
17+ from .prompt import AKS_CONTEXT_PROMPT
18+
1819
1920# NOTE(mainred): holmes leverage the log handler RichHandler to provide colorful, readable and well-formatted logs
2021# making the interactive mode more user-friendly.
@@ -32,7 +33,7 @@ def init_log():
3233
3334 from holmes .utils .console .logging import init_logging
3435
35- # TODO: make log verbose configurable, currently disbled by [].
36+ # TODO: make log verbose configurable, currently disabled by [].
3637 return init_logging ([])
3738
3839
@@ -98,8 +99,6 @@ def aks_agent(
9899 from holmes .plugins .prompts import load_and_render_prompt
99100 from holmes .utils .console .result import handle_result
100101
101- from .prompt import AKS_CONTEXT_PROMPT
102-
103102 # Detect and read piped input
104103 piped_data = None
105104 if not sys .stdin .isatty ():
@@ -125,7 +124,7 @@ def aks_agent(
125124 )
126125
127126 if not prompt and not interactive and not piped_data :
128- raise typer . BadParameter (
127+ raise CLIError (
129128 "Either the 'prompt' argument must be provided (unless using --interactive mode)."
130129 )
131130
You can’t perform that action at this time.
0 commit comments