-
Notifications
You must be signed in to change notification settings - Fork 2.5k
feat(agent): added workflow, kb, and function as a tool for agent block, fix keyboard nav in tool input #2107
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: staging
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR adds workflow, knowledge base, and function as tool options for agent blocks, alongside keyboard navigation improvements for the tool input selector. Major changes:
Implementation notes:
Confidence Score: 3/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant ToolInput
participant WorkflowSelector
participant WorkflowInputMapper
participant API
participant ToolCommand
participant ToolCredentialSelector
participant Combobox
User->>ToolInput: Select workflow/kb/function tool
ToolInput->>ToolCommand: Open tool selection popover
ToolCommand->>ToolCommand: Handle keyboard navigation
Note over ToolCommand: Arrow keys scroll active item<br/>into view automatically
User->>ToolCommand: Select tool (Enter/Click)
ToolCommand->>ToolInput: Tool selected
alt Tool is workflow_executor
ToolInput->>WorkflowSelector: Render workflow selector
User->>WorkflowSelector: Select workflow
WorkflowSelector->>API: Fetch workflows list
API-->>WorkflowSelector: Return workflows
User->>WorkflowSelector: Choose workflow
WorkflowSelector->>ToolInput: Update workflowId param
ToolInput->>WorkflowInputMapper: Render input mapper
WorkflowInputMapper->>API: GET /api/workflows/:id
API-->>WorkflowInputMapper: Return workflow data
WorkflowInputMapper->>WorkflowInputMapper: Extract input fields from trigger block
WorkflowInputMapper->>WorkflowInputMapper: Render ShortInput for each field
User->>WorkflowInputMapper: Fill input values
WorkflowInputMapper->>ToolInput: Update inputMapping JSON
end
alt Tool requires OAuth
ToolInput->>ToolCredentialSelector: Render credential selector
ToolCredentialSelector->>ToolCredentialSelector: Calculate effectiveServiceId
ToolCredentialSelector->>API: Fetch OAuth credentials
API-->>ToolCredentialSelector: Return credentials
ToolCredentialSelector->>Combobox: Display credentials
User->>Combobox: Search/select credential
Combobox->>ToolCredentialSelector: Credential selected
ToolCredentialSelector->>ToolInput: Update credential param
Note over ToolCredentialSelector: Listens to credential-disconnected<br/>event for auto-refresh
end
ToolInput->>ToolInput: Store tool configuration
Note over ToolInput: Tool ready for agent execution
|
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.
12 files reviewed, 1 comment
...components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx
Outdated
Show resolved
Hide resolved
73241c1 to
118c639
Compare
Summary
Type of Change
Testing
Tested manually
Checklist