dbagent-cli 0.3.6__tar.gz → 0.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/PKG-INFO +2 -2
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/__init__.py +1 -1
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/cli.py +7 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/ui/console.py +53 -23
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent_cli.egg-info/PKG-INFO +2 -2
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/pyproject.toml +2 -2
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/README.md +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/agent/confidence.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/agent/conversation.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/agent/doctor.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/agent/error_classifier.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/agent/generator.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/agent/pipeline.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/agent/recommender.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/agent/validator.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/config.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/connectors/base.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/connectors/factory.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/connectors/mongo.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/connectors/relational.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/execution/__init__.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/execution/cache.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/execution/changeset.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/execution/cost.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/execution/recovery.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/execution/sandbox.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/execution/streaming.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/llm/auto_setup.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/llm/base.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/llm/factory.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/llm/gemini_provider.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/llm/groq_provider.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/llm/mock_provider.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/llm/ollama_provider.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/llm/openrouter_provider.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/schema/cache.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/schema/formatter.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/schema/graph.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/schema/models.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/schema/retriever.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/schema/selector.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/security/__init__.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/security/audit.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/security/environment.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/security/masking.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/security/modes.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/security/rbac.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/semantic/__init__.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/semantic/dictionary.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/semantic/templates.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/sql/__init__.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/sql/optimizer.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/sql/validator.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/ui/viewer.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent/ui/visualizer.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent_cli.egg-info/SOURCES.txt +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent_cli.egg-info/dependency_links.txt +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent_cli.egg-info/entry_points.txt +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent_cli.egg-info/requires.txt +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/dbagent_cli.egg-info/top_level.txt +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/setup.cfg +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_cache.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_cli.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_connectors.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_doctor_and_viz.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_generator.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_graph.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_recovery.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_safety.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_sandbox.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_schema.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_security.py +0 -0
- {dbagent_cli-0.3.6 → dbagent_cli-0.3.8}/tests/test_semantic.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbagent-cli
|
|
3
|
-
Version: 0.3.
|
|
4
|
-
Summary: Production-Grade AI Database Copilot with
|
|
3
|
+
Version: 0.3.8
|
|
4
|
+
Summary: Production-Grade AI Database Copilot with Responsive Zoom-Out & Wide Table Viewing (CLI)
|
|
5
5
|
Author: Santhosh Gupta
|
|
6
6
|
Requires-Python: >=3.9
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
@@ -629,6 +629,13 @@ def chat_command(
|
|
|
629
629
|
print_results_vertical(last_result.columns, last_result.rows)
|
|
630
630
|
continue
|
|
631
631
|
|
|
632
|
+
if cmd_name in [":wide", ":all", ":raw"]:
|
|
633
|
+
if not last_result or not last_result.rows:
|
|
634
|
+
print_warning("No previous query results to display.")
|
|
635
|
+
continue
|
|
636
|
+
print_results_table(last_result.columns, last_result.rows, title="All Columns (Wide View)", show_all=True)
|
|
637
|
+
continue
|
|
638
|
+
|
|
632
639
|
if cmd_name in [":scroll", ":scroller", ":pager"]:
|
|
633
640
|
if not last_result or not last_result.rows:
|
|
634
641
|
print_warning("No previous query results to scroll.")
|
|
@@ -62,25 +62,35 @@ def print_results_table(
|
|
|
62
62
|
rows: List[Dict[str, Any]],
|
|
63
63
|
title: str = "Results",
|
|
64
64
|
col_page: int = 1,
|
|
65
|
-
cols_per_page: int =
|
|
65
|
+
cols_per_page: Optional[int] = None,
|
|
66
|
+
show_all: bool = False,
|
|
66
67
|
) -> None:
|
|
67
68
|
"""
|
|
68
|
-
Print query results in a clean, readable Rich table
|
|
69
|
+
Print query results in a clean, readable Rich table.
|
|
70
|
+
Dynamically scales column count based on terminal zoom-out/width.
|
|
69
71
|
"""
|
|
70
72
|
if not columns or not rows:
|
|
71
73
|
console.print("[dim]Query returned 0 rows.[/dim]\n")
|
|
72
74
|
return
|
|
73
75
|
|
|
74
76
|
total_cols = len(columns)
|
|
75
|
-
|
|
77
|
+
term_width = console.width or 120
|
|
78
|
+
auto_cols = max(8, term_width // 16)
|
|
79
|
+
|
|
80
|
+
if show_all or total_cols <= auto_cols:
|
|
81
|
+
effective_cols_per_page = total_cols
|
|
82
|
+
else:
|
|
83
|
+
effective_cols_per_page = cols_per_page or auto_cols
|
|
84
|
+
|
|
85
|
+
total_pages = max(1, math.ceil(total_cols / effective_cols_per_page))
|
|
76
86
|
current_page = max(1, min(col_page, total_pages))
|
|
77
87
|
|
|
78
|
-
start_idx = (current_page - 1) *
|
|
79
|
-
end_idx = min(start_idx +
|
|
80
|
-
display_cols = columns[start_idx:end_idx]
|
|
88
|
+
start_idx = (current_page - 1) * effective_cols_per_page
|
|
89
|
+
end_idx = min(start_idx + effective_cols_per_page, total_cols)
|
|
90
|
+
display_cols = columns if show_all else columns[start_idx:end_idx]
|
|
81
91
|
|
|
82
92
|
tbl_title = f"[bold cyan]{title}[/bold cyan]"
|
|
83
|
-
if total_pages > 1:
|
|
93
|
+
if total_pages > 1 and not show_all:
|
|
84
94
|
tbl_title += f" [dim](Cols {start_idx + 1}–{end_idx} of {total_cols} | Page {current_page}/{total_pages})[/dim]"
|
|
85
95
|
|
|
86
96
|
table = Table(title=tbl_title, show_header=True, header_style="bold magenta", border_style="dim")
|
|
@@ -101,9 +111,9 @@ def print_results_table(
|
|
|
101
111
|
console.print("")
|
|
102
112
|
console.print(table)
|
|
103
113
|
|
|
104
|
-
if total_pages > 1:
|
|
114
|
+
if total_pages > 1 and not show_all:
|
|
105
115
|
console.print(
|
|
106
|
-
f"[dim]⚡ [bold]:page <1-{total_pages}>[/bold] to switch
|
|
116
|
+
f"[dim]⚡ [bold]:page <1-{total_pages}>[/bold] to switch page | [bold]:wide[/bold] / zoom-out for all columns | [bold]:card[/bold] for vertical view | [bold]:scroll[/bold] for scroller[/dim]"
|
|
107
117
|
)
|
|
108
118
|
console.print(f"[bold green]Total rows:[/bold green] {len(rows)}\n")
|
|
109
119
|
|
|
@@ -135,22 +145,42 @@ def print_results_vertical(
|
|
|
135
145
|
|
|
136
146
|
def open_interactive_scroller(columns: List[str], rows: List[Dict[str, Any]]) -> None:
|
|
137
147
|
"""
|
|
138
|
-
|
|
148
|
+
Interactive Column Scroller allowing seamless navigation through wide tables.
|
|
139
149
|
"""
|
|
140
150
|
if not columns or not rows:
|
|
141
151
|
console.print("[dim]No data to display.[/dim]\n")
|
|
142
152
|
return
|
|
143
153
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
cols_per_page = 6
|
|
155
|
+
total_cols = len(columns)
|
|
156
|
+
total_pages = max(1, math.ceil(total_cols / cols_per_page))
|
|
157
|
+
current_page = 1
|
|
158
|
+
|
|
159
|
+
from rich.prompt import Prompt
|
|
160
|
+
|
|
161
|
+
console.print(f"\n[bold cyan]─── Interactive Multi-Column Scroller ({total_cols} columns, {len(rows)} rows) ───[/bold cyan]")
|
|
162
|
+
while True:
|
|
163
|
+
print_results_table(columns, rows, title="Column Scroller", col_page=current_page, cols_per_page=cols_per_page)
|
|
164
|
+
|
|
165
|
+
console.print(f"[bold cyan]Scroller Navigation:[/bold cyan] [bold]n[/bold]=Next Cols | [bold]p[/bold]=Prev Cols | [bold]1-{total_pages}[/bold]=Jump to Page | [bold]c[/bold]=Vertical Cards | [bold]q[/bold]=Exit Scroller")
|
|
166
|
+
choice = Prompt.ask("[dim]scroller>[/dim]", default="n").strip().lower()
|
|
167
|
+
|
|
168
|
+
if choice in ("q", "quit", "exit", "back"):
|
|
169
|
+
console.print("[dim]Exited scroller.[/dim]\n")
|
|
170
|
+
break
|
|
171
|
+
elif choice in ("n", "next", ""):
|
|
172
|
+
current_page = 1 if current_page >= total_pages else current_page + 1
|
|
173
|
+
elif choice in ("p", "prev", "previous"):
|
|
174
|
+
current_page = total_pages if current_page <= 1 else current_page - 1
|
|
175
|
+
elif choice in ("c", "card", "v", "vertical"):
|
|
176
|
+
print_results_vertical(columns, rows)
|
|
177
|
+
Prompt.ask("[dim]Press Enter to return to scroller...[/dim]")
|
|
178
|
+
else:
|
|
179
|
+
try:
|
|
180
|
+
page_num = int(choice)
|
|
181
|
+
if 1 <= page_num <= total_pages:
|
|
182
|
+
current_page = page_num
|
|
183
|
+
else:
|
|
184
|
+
console.print(f"[yellow]Invalid page. Please choose between 1 and {total_pages}.[/yellow]")
|
|
185
|
+
except ValueError:
|
|
186
|
+
pass
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbagent-cli
|
|
3
|
-
Version: 0.3.
|
|
4
|
-
Summary: Production-Grade AI Database Copilot with
|
|
3
|
+
Version: 0.3.8
|
|
4
|
+
Summary: Production-Grade AI Database Copilot with Responsive Zoom-Out & Wide Table Viewing (CLI)
|
|
5
5
|
Author: Santhosh Gupta
|
|
6
6
|
Requires-Python: >=3.9
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dbagent-cli"
|
|
7
|
-
version = "0.3.
|
|
8
|
-
description = "Production-Grade AI Database Copilot with
|
|
7
|
+
version = "0.3.8"
|
|
8
|
+
description = "Production-Grade AI Database Copilot with Responsive Zoom-Out & Wide Table Viewing (CLI)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
11
|
authors = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|