Repository navigation
Rename the command to tabular-memory and add first-run onboarding (v4.0.0) - #4
Conversation
….0.0 Rename: the `hd` command is now `tabular-memory` everywhere, including the SQL tag on the plugin's own queries (tabular-memory:internal). Onboarding: - Session start checks the hotdata CLI and login once per machine and tells the user the exact fix until it passes; then it welcomes them once. - `tabular-memory doctor` checks CLI, login, workspace and project database, and prints the fix for each failure. - `tabular-memory demo` loads a public NYC taxi sample by URL and suggests questions; `demo --remove` drops it. - A project with no database tells the agent which data files are too big to read, with the load command for each.
| capture_output=True, text=True, timeout=timeout, | ||
| env=hotdata.credentials()) | ||
| except (OSError, subprocess.SubprocessError) as error: | ||
| return False, str(error) |
There was a problem hiding this comment.
nit: Return a separate "could not check" result when auth status times out or fails to start, and word the message for that case. (not blocking)
problem() treats a 5-second timeout as "not logged in". On a slow network, a logged-in user sees "Type ! hotdata auth login". The hook also returns early on that message, so the session gets no orientation.
| if not files: | ||
| return "" | ||
| lines = ["This project has data files too big to read into context, not yet in Hotdata:"] | ||
| lines += [f" tabular-memory load {p} # {s / (1024 * 1024):.0f}MB" for p, s in files] |
There was a problem hiding this comment.
nit: Quote the path with shlex.quote(str(p)). (not blocking)
unloaded_hint gives the agent a command to copy. For a file such as data/my trips.csv, the unquoted command passes two arguments, and tabular-memory load fails.
| # whatever follows it. SQL in these commands carries \"PULocationID\" inside the quotes. | ||
| DQ = r'"((?:[^"\\]|\\.)*)"' | ||
| QUERY = re.compile(r"(?:hotdata query|hd query)\s+" + DQ, re.S) | ||
| QUERY = re.compile(r"(?:hotdata query|tabular-memory query)\s+" + DQ, re.S) |
There was a problem hiding this comment.
nit: Match both names, for example (?:hotdata query|tabular-memory query|hd query), and do the same in BATCH and BATCH_HEREDOC. (not blocking)
The published bench figures come from transcripts that call hd. With only the new name, redundancy.py finds no queries in those transcripts, so the old figures cannot be reproduced.
A timeout or error from `hotdata auth status` no longer tells the user to log in or hides the project's orientation; the check is tried again next session.
|
Fixed: the failed login check (now reported as unknown, never blocks the session) and unquoted paths in suggested load commands. Not changed: matching |
Rename
The
hdcommand is nowtabular-memoryeverywhere, including the SQL tag on the plugin's own queries (tabular-memory:internal). Breaking, so the version goes to 4.0.0.Onboarding
hotdataCLI and login once per machine. Until both work, it tells the user the exact fix. Then it welcomes them once.tabular-memory doctor: checks CLI, login, workspace and project database, and prints the fix for each failure.tabular-memory demo: loads a public NYC taxi sample (48MB, 2.96M rows) by URL and suggests questions.demo --removedrops it.Testing
doctor, the welcome, the file hint anddemoagainst a real workspace. A ready session start takes 54ms.tabular-memory loadthen onequery, and answered 405103, which matches DuckDB on the raw file.