Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
ai-stock-analysis
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-solutions
ai-stock-analysis
Commits
b90a3485
Commit
b90a3485
authored
Aug 17, 2026
by
MD. SHAHIDUL ISLAM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: implement standardized CLI theming and unify prompt interactions via new theme configuration
parent
5ed46a51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
7 deletions
+39
-7
dashboard_cli.py
dohasecuritiesstockai/dashboard_cli.py
+39
-7
No files found.
dohasecuritiesstockai/dashboard_cli.py
View file @
b90a3485
...
...
@@ -9,6 +9,7 @@ import typer
from
rich.console
import
Console
from
rich.panel
import
Panel
from
dohasecuritiesstockai.api.repository
import
AnalysisRepository
from
dohasecuritiesstockai.dashboard
import
(
dashboard_url
,
launch_dashboard
,
...
...
@@ -28,6 +29,14 @@ def show_dashboard(
str
|
None
,
typer
.
Option
(
"--date"
,
"-d"
,
help
=
"Dashboard data date (YYYY-MM-DD)."
),
]
=
None
,
saved_run
:
Annotated
[
bool
,
typer
.
Option
(
"--saved-run/--fresh"
,
help
=
"Load the completed multi-agent state for this symbol/date instead of "
"opening a data-only dashboard."
,
),
]
=
False
,
use_ai
:
Annotated
[
bool
,
typer
.
Option
(
...
...
@@ -65,21 +74,42 @@ def show_dashboard(
Panel
.
fit
(
f
"[bold]DSE score dashboard[/bold]
\n
"
f
"{symbol.strip().upper()} · {requested_date.isoformat()} · "
f
"{'grounded AI research' if use_ai else 'calculated data only'}"
,
f
"{'saved multi-agent run' if saved_run else 'fresh DSE evidence'} · "
f
"{'AI synthesis' if use_ai else 'no additional AI call'}"
,
border_style
=
"cyan"
,
)
)
agent_state
=
None
state_path
=
None
if
saved_run
:
repository
=
AnalysisRepository
(
DEFAULT_CONFIG
[
"results_dir"
])
state_path
=
repository
.
find_state_log
(
symbol
,
requested_date
)
if
state_path
is
None
:
console
.
print
(
"[bold red]Saved run not found:[/bold red] "
f
"{symbol.strip().upper()} on {requested_date.isoformat()}"
)
raise
typer
.
Exit
(
code
=
1
)
try
:
agent_state
=
repository
.
load_state
(
state_path
)
except
(
OSError
,
ValueError
)
as
exc
:
console
.
print
(
f
"[bold red]Saved run could not be read:[/bold red] {exc}"
)
raise
typer
.
Exit
(
code
=
1
)
from
None
try
:
status
=
(
"Collecting yearly DSE evidence and running the configured AI analyst…"
if
use_ai
else
"Requesting the dashboard fields from the DSE data APIs…"
)
if
saved_run
:
status
=
"Loading the saved reports and current dashboard metrics…"
else
:
status
=
(
"Collecting yearly DSE evidence and running the configured AI analyst…"
if
use_ai
else
"Requesting the dashboard fields from the DSE data APIs…"
)
with
console
.
status
(
status
):
analysis
,
saved_path
=
prepare_dashboard_analysis
(
symbol
,
requested_date
,
agent_state
=
Non
e
,
agent_state
=
agent_stat
e
,
results_dir
=
DEFAULT_CONFIG
[
"results_dir"
],
use_ai
=
use_ai
,
config
=
DEFAULT_CONFIG
,
...
...
@@ -93,6 +123,8 @@ def show_dashboard(
f
"[green]✓ Fundamental score:[/green] "
f
"{analysis.fundamental_score}/100 ({analysis.score_label.en})"
)
if
state_path
is
not
None
:
console
.
print
(
f
"[green]✓ Saved reports loaded:[/green] {state_path}"
)
if
analysis
.
ai_research
is
not
None
:
console
.
print
(
f
"[green]✓ AI analyst:[/green] {analysis.ai_research.provider} / "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment