AI assistant: Add ability to create and delete workspaces - #6089
Draft
jurgenwerk wants to merge 6 commits into
Draft
AI assistant: Add ability to create and delete workspaces#6089jurgenwerk wants to merge 6 commits into
jurgenwerk wants to merge 6 commits into
Conversation
The assistant had no way to create a workspace and told users to do it by hand in the UI. This tool runs the same path as the "New Workspace" tile: it creates the realm on the user's realm server, records it in the user's realm list so the workspace chooser shows it without a reload, and returns the new realm URL so the assistant can report it. Name and endpoint are both optional. A random display name is generated when none is given, and the endpoint is derived from the name and normalized into the characters the server accepts. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Preview deploymentsHost Test Results 1 files ±0 1 suites ±0 1h 43m 12s ⏱️ - 5m 21s Results for commit 5400e96. ± Comparison against earlier commit 9c9fbe9. Realm Server Test Results 1 files ±0 212 suites ±0 1h 17m 17s ⏱️ + 1m 24s Results for commit 5400e96. ± Comparison against earlier commit 9c9fbe9. |
Runs the same path as "Delete Workspace" in the chooser tile menu: the realm is removed on the realm server, it leaves the user's realm list, and the app falls back to the workspace chooser if the deleted workspace was the one being viewed. Only realms the user owns can be deleted. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The room rendered the create and delete results as "Untitled Card" with an empty thumbnail. The result cards now carry a display name and show the workspace name and URL. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Neither tool needs to hand data back through a result card. Delete already knows the realm it removed. Create now opens the new workspace when it finishes, so the workspace URL reaches the assistant through the context sent with the tool result, and nothing renders in the room besides the tool call itself. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The integration tests looked up the realm-server service before the test realm and its mocked endpoints existed, so the service's catalog fetch on construction hit the network and failed every test in the module. The acceptance test saw the previous workspace in the tool result's context: the realm service had not met the new realm yet, so the open index card resolved to the cached realm. The tool now registers the new realm with the realm service before opening it, which also fixes the reported URL in a real session. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The acceptance test read the tool result's `data` as an object; it is a JSON string on the wire, so the workspace URL check compared against undefined. The integration test has no realm mounted at the created URL, so the realm-info fetch the tool now makes failed as an unhandled rejection. The test records that request instead of performing it, and the tool treats a failed info fetch as a warning rather than a failed creation. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.