Repository navigation
Conversation
`+` could only reach workspaces that already had a running session: the picker offered `eca--sessions` with `require-match`, and nothing in the dashboard could create a session. It was also skipped entirely whenever point sat on a row, since chat rows carry the session id too, so the picker was reachable only from the footer and only with two or more sessions running. The picker now always asks, defaults to the workspace at point, and takes any other input as a directory to start a session in. A path inside a running workspace reuses that session instead of spawning a second server. `eca-start-session` extracts the status dispatch out of the `eca` command so the dashboard can start a session too, and `eca--initialize` gained a ready callback so the optional initial prompt can be sent into a session that did not exist when it was typed.
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.
TL;DR
+in theeca-workspacesdashboard now asks which workspace to start the chat in, and takes any existing directory, not just the workspaces that already have a running session.Problem
eca-workspaces-new-chatresolved its workspace througheca-workspaces--read-session, which returns the session at point and otherwise runscompleting-readwithrequire-matchovereca--sessions. Two consequences:eca-workspaces-session-idtext property too, so every row short-circuited it; only the footer and the trailing blank line reached the prompt, and only with two or more sessions running.Change
eca-workspaces--read-workspacealways prompts, listing the running workspaces with the one at point first. It passesrequire-matchnil, so any other input is expanded and validated as a directory, and appends anOther directory...entry that callsread-directory-name. A path that is not a directory signalsNot a directory: PATH.+ RETon a row costs the same as before: the workspace at point is both the first candidate (display-sort-functionidentity) andcompleting-read's DEF, so it is selected on empty input under vertico and the default UI alike.eca-session-for-root, instead of spawning a second server for the same repo.eca-start-sessionextracts the statuspcaseout of theecacommand so the dashboard can start a session, andeca--initializetakes an optional ready callback. That callback sends the optional initial prompt into a session that did not exist when the prompt was typed.The initial prompt question is unchanged.
Testing
12 new buttercup specs cover candidate ordering, the default, typed paths, tilde expansion, the missing-directory error, session reuse for a subdirectory, and the initial prompt on both the running and the freshly started path. Full suite: 640 specs, 0 failed. Byte-compile, checkdoc and package-lint report only warnings that reproduce on master.