Conversation
d6d37f1 to
c934e64
Compare
c934e64 to
54a8370
Compare
54a8370 to
35a710b
Compare
| location = f"{refs[0].catalog}.{refs[0].schema}" | ||
| append([_skill_schema_choice(location, len(refs), location in in_scope)]) | ||
|
|
||
| list_all_skills(workspace, token, on_skills=on_skills) |
There was a problem hiding this comment.
P1: list_all_skills(...) returns (refs, reason) and yields partial results once its 30s wall-clock deadline is hit (or a schema probe errors), but the loader discards the return. When the walk times out on a large/slow workspace, the picker simply stops adding rows and the "Loading more…" footer disappears — indistinguishable from a complete load. The user then scopes only the schemas that happened to arrive in time, believing they've seen everything.
Suggest capturing reason and surfacing it — e.g. append a disabled sentinel row (⚠ schema discovery timed out — showing partial results) or print_warning after the picker closes. Same pattern exists in the download picker's _skills_download_background_loader (#579).
35a710b to
d94e61f
Compare
dee8c30 to
bad3f91
Compare
bad3f91 to
29363a9
Compare
29363a9 to
70ae698
Compare
`ug skill add --mcp` with no --location errored asking for a typed schema. On an interactive terminal it now opens a picker of the workspace's schemas that contain skills, streamed in as discovery finds them, and adds the selected schemas to the skills MCP scope. The picker mirrors the download picker and reuses its machinery: the workspace walk (list_all_skills) and the streaming checkbox widget. Because list_all_skills probes one schema per call, each batch is one schema's skill set, so the loader renders one row per schema with its exact skill count. Already-scoped schemas are flagged and stay selectable, since adding is additive (removal is `ug skill remove --mcp`). To let both the picker (in mcp.py) and the download flow use the workspace walk without a circular import, the UC skills read layer (SkillRef, the API client, and list_all_skills) moves into a new skills_api.py that depends only on databricks.py; mcp.py and skills_download.py both import it. add_skills_command's apply body is extracted into add_skill_locations_to_mcp, shared by the command and the picker. Co-authored-by: Isaac <no-reply@databricks.com>
70ae698 to
f84cc77
Compare
What
ug skill add --mcpwith no--locationerrored asking for a typed schema. On aninteractive terminal it now opens a picker of the workspace's schemas that contain
skills, streamed in as discovery finds them, and adds the selected schemas to the
skills MCP connection's scope.
Why
The download path already has an interactive picker; the MCP scope path was the only
add-side flow still requiring a typed
--location. This makes the two symmetric.How
mcp.py, beside the other skill MCP-scope commands) reuses the downloadpicker's machinery: the workspace walk (
list_all_skills) and the streaming checkboxwidget.
list_all_skillsprobes one schema per call, so each streamed batch is oneschema's skill set; the loader renders one row per schema with its exact skill count.
adding is additive (removal is
ug skill remove --mcp).mcp.py(picker) andskills_download.py(download) use the workspace walkwithout a circular import, the UC skills read layer (
SkillRef, the API client, andlist_all_skills) moves into a newskills_api.pythat depends only ondatabricks.py.add_skills_command's apply body is extracted intoadd_skill_locations_to_mcp, sharedby the command and the picker so each runs a single client setup.
--location, so scripts fail loudly.Testing
uv run ruff check,ruff format --check,ty check src, anduv run pytestall pass(the pre-existing
test_e2e_user_agent/test_claude_smart_routing_v2failures also failon the base). The read-layer tests move to
test_skills_api.py; added tests for the schemapicker, its command,
add_skill_locations_to_mcp/configured_skill_locations, and the CLIdispatch.
Stack
Part of gh stack #576, on top of #586 (
skills-download-workspace-id).This pull request and its description were written by Isaac.
Screen.Recording.2026-09-12.at.11.35.02.PM.mov
Stack created with GitHub Stacks CLI • Give Feedback 💬