Skip to content

Conversation

@shikokuchuo
Copy link
Member

Closes #14.

This PR implements:

  1. Now the response to a list_r_sessions tool call shows the session number i instead of the sessions just being a numbered list. This makes it much easier to select a session by number.
  2. I've made discovery default to at least 8 sessions (we always attempt to dial 1 - 8) so that they can really come and go. I think this is probably enough, but it's not very costly to dial a few additional IPC socket addresses if we wanted to.
  3. As describe_session() only generates text, we can also use raw mode sends for that query (avoiding R serialization).

@simonpcouch feel free to optimize the prompt if you see a way to do this! Another FYI @wch.

Copy link
Collaborator

@simonpcouch simonpcouch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!!

Here's a log of a chat where the listing works as I'd expect: https://claude.ai/share/b2a7e33c-5c18-4edd-a2a1-8052e5fb32f0

That said, in the last step where the tool calls returns only indices 1 and 3, it lists them out as 1 and 2 in its user turn. Will try and adjust the prompt to emphasize that the indices should be preserved even if they skip over some integers.

@simonpcouch simonpcouch merged commit c236ceb into posit-dev:main May 8, 2025
6 checks passed
@shikokuchuo shikokuchuo deleted the dev branch May 8, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

implement server discovery

2 participants