-
Notifications
You must be signed in to change notification settings - Fork 5
batch exec #59
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
base: main
Are you sure you want to change the base?
batch exec #59
Conversation
Greptile OverviewGreptile SummaryAdded
Confidence Score: 3/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant Client
participant HttpServer
participant SessionManager
participant GeminiAgent
participant HonoStream
Client->>HttpServer: POST /batch<br/>act("open amazon.com")\nact("open google.com")
HttpServer->>HttpServer: Parse act() commands using regex
HttpServer->>HttpServer: Extract actions array
HttpServer->>SessionManager: getOrCreate(config)
SessionManager-->>HttpServer: agent instance
HttpServer->>HonoStream: Initialize streaming response
loop For each action
HttpServer->>HonoStream: Write action marker
HttpServer->>GeminiAgent: execute(action, stream, signal)
GeminiAgent->>HonoStream: Stream execution results
GeminiAgent-->>HttpServer: Execution complete
end
HttpServer->>Client: Complete streaming response
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
| const request = c.get('validatedBody') as ChatRequest; | ||
|
|
||
| // Parse act("...") commands from message | ||
| const actRegex = /act\("([^"]+)"\)/g; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: regex doesn't handle escaped quotes within action strings - act("say \"hello\"") would fail to parse correctly
| const actRegex = /act\("([^"]+)"\)/g; | |
| const actRegex = /act\("((?:[^"\\]|\\.)*)"\)/g; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/agent/src/http/HttpServer.ts
Line: 147:147
Comment:
**logic:** regex doesn't handle escaped quotes within action strings - `act("say \"hello\"")` would fail to parse correctly
```suggestion
const actRegex = /act\("((?:[^"\\]|\\.)*)"\)/g;
```
How can I resolve this? If you propose a fix, please make it concise.
No description provided.