Skip to content

Api mode POC #2461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Api mode POC #2461

wants to merge 3 commits into from

Conversation

omansour
Copy link

@omansour omansour commented Aug 1, 2025

Description of changes:

POC on a unix socket api for q dev cli

Video shows an exemple of a socket outputting messages from q cli, and one allowing ton input messages.

Screen.Recording.2025-08-01.at.14.54.48.mov

Can be an idea to build another client on top of q cli, or debug (see behaviors of "thinking" and of the tools)

PR shows:

  • it seems doable
  • it implies some difficult changes, notably in input_source.rs to deal with the current blocking process when we are waiting for the user input.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Olivier Mansour added 3 commits August 1, 2025 15:32
- Add comprehensive API mode infrastructure with socket-based communication
- Implement MessageRouter for handling different message types (chat, thinking, error)
- Add SocketManager and ConnectionHandler for client connection management
- Create SocketLifecycleManager for proper cleanup and resource management
- Add ApiChatSession for API-driven chat interactions
- Add protocol definitions for structured message passing
- Clean up unused dependencies and update Cargo.lock

Note: This is work in progress with compiler warnings and missing features
TODO: Implement thinking messages, tool integration, and control mechanisms
- Removed test_session_event_routing test as route_session_event method is not yet implemented
- This is part of the WIP API mode functionality that needs further development
@omansour omansour changed the title Api mode Api mode POC Aug 1, 2025
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.

1 participant