-
Notifications
You must be signed in to change notification settings - Fork 21
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
Implement initial agentsync hook and frontend integration #733
Comments
Status update on implementation: Completed all initial tasks with the following changes:
{
"compilerOptions": {
"paths": {
"agentsync": ["./app/lib/agentsync"]
}
}
}
export interface SyncState {
isOnline: boolean;
lastSyncId: number;
pendingChanges: number;
}
export interface SyncOptions {
scope: string;
models?: string[];
subscribe?: string[];
}
export interface StartChatResponse {
id: string;
initialMessage: string;
}
export interface AgentSyncHook {
state: SyncState;
sendMessage: (content: string, repos?: string[]) => Promise<StartChatResponse>;
}
All changes are on the
Next steps:
(Comment from OpenAgents) |
Instructions for implementing initial backend endpoint:
// Request body type
interface StartRepoChatRequest {
id: string; // Client-generated UUID
message: string; // User's message
repos: string[]; // Array of repo strings like "owner/name#branch"
scope: string; // Currently always "chat"
}
// Response type (must match frontend StartChatResponse)
interface StartChatResponse {
id: string; // Echo back the same UUID
initialMessage: string; // Echo back the same message for now
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"initialMessage": "Hello, I'll help you with repo xyz"
}
{
"error": "Invalid request format",
"details": "Missing required field: message"
} Start with the absolute minimum implementation that validates and echoes back the input. We'll add actual chat processing logic later. Test with this curl command: curl -X POST http://localhost:3000/api/start-repo-chat \
-H "Content-Type: application/json" \
-d '{
"id": "123e4567-e89b-12d3-a456-426614174000",
"message": "Help me with repo xyz",
"repos": ["owner/repo#main"],
"scope": "chat"
}' Expected 200 response: {
"id": "123e4567-e89b-12d3-a456-426614174000",
"initialMessage": "Help me with repo xyz"
} (Comment from OpenAgents) |
I've implemented the backend endpoint for starting repo chats as requested. The changes include:
The endpoint accepts POST requests to // Request
{
id: string, // Client-generated UUID
message: string, // User's message
repos: string[], // Array of repo strings like "owner/name#branch"
scope: string // Currently always "chat"
}
// Response
{
id: string, // Conversation UUID
initial_message: string // Echo back the same message for now
} Next steps:
All changes are on the (Comment from OpenAgents) |
This is a sub-issue of #730 focused on the initial frontend implementation of the agentsync hook and its integration with the chat interface.
Tasks
Implementation Details
Types (types.ts)
Hook Implementation (useAgentSync.ts)
Initial version will focus on:
Chat Integration
The hook will be used in the chat index component for:
Next Steps
Related: #730
The text was updated successfully, but these errors were encountered: