-
Notifications
You must be signed in to change notification settings - Fork 30
message_processor function, api_services/api_id as tool #198
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
Changes from all commits
6f11313
b33c5f2
5120991
b20defc
463749f
4cc9741
c349e4b
13dc02b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,7 @@ const createMessageProcessorSchema = z.object({ | |
| type CreateMessageProcessorInput = z.infer<typeof createMessageProcessorSchema>; | ||
|
|
||
| const defaultYamlContent = `type: javascript | ||
| description: double the number | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, locate and read the CreateFunctionDialog.tsx file
fd "CreateFunctionDialog.tsx" --type fRepository: rootflo/wavefront Length of output: 135 🏁 Script executed: # Read the CreateFunctionDialog.tsx file
cat -n "wavefront/client/src/pages/apps/[appId]/functions/CreateFunctionDialog.tsx"Repository: rootflo/wavefront Length of output: 7609 🏁 Script executed: # Search for messageProcessorService implementation
fd "messageProcessor" -t f | head -20Repository: rootflo/wavefront Length of output: 43 🏁 Script executed: # Search for messageProcessorService references in the codebase
rg "messageProcessorService" --type ts --type tsx -A 3 | head -50Repository: rootflo/wavefront Length of output: 88 🏁 Script executed: # Search for messageProcessorService references
rg "messageProcessorService" -A 3 | head -80Repository: rootflo/wavefront Length of output: 3157 🏁 Script executed: # Find MessageProcessorService implementation
fd "MessageProcessor" -t f | grep -i serviceRepository: rootflo/wavefront Length of output: 43 🏁 Script executed: # Search for MessageProcessorService class definition
rg "class MessageProcessorService" -A 30Repository: rootflo/wavefront Length of output: 6930 🏁 Script executed: # Check the UpdateMessageProcessorRequest to see what fields are sent during update
rg "UpdateMessageProcessorRequest\|CreateMessageProcessorRequest" -A 10Repository: rootflo/wavefront Length of output: 43 🏁 Script executed: # Search for message processor type definitions
rg "interface.*MessageProcessor\|type.*MessageProcessor" -A 5 | head -100Repository: rootflo/wavefront Length of output: 43 🏁 Script executed: # Check the message-processor-service.ts file for type definitions
cat "wavefront/client/src/api/message-processor-service.ts"Repository: rootflo/wavefront Length of output: 2278 🏁 Script executed: # Find message processor types
fd "message-processor" -t f | grep typeRepository: rootflo/wavefront Length of output: 108 🏁 Script executed: # Read the message processor types file
cat "wavefront/client/src/types/message-processor.ts"Repository: rootflo/wavefront Length of output: 1360 🏁 Script executed: # Check the update/edit dialog to see how it handles descriptions
cat -n "wavefront/client/src/pages/apps/[appId]/functions/[functionId].tsx" | head -200Repository: rootflo/wavefront Length of output: 8347 🏁 Script executed: # Continue reading the edit page form section
cat -n "wavefront/client/src/pages/apps/[appId]/functions/[functionId].tsx" | sed -n '200,400p'Repository: rootflo/wavefront Length of output: 6171 Clarify the relationship between YAML description and processor description metadata. The default YAML template includes a
While these serve different purposes (function specification vs. system metadata), this creates a potential UX issue:
Consider adding clarity in the UI (e.g., labels or help text) to explain the distinction: the YAML description is part of the function specification, while the form description is the processor's metadata in the system. 🤖 Prompt for AI Agents |
||
| function: | ||
| code: | | ||
| export default function(input) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,16 +14,29 @@ export interface ApiAuth { | |
| api_key_header?: string; | ||
| } | ||
|
|
||
| export interface PayloadField { | ||
| name: string; | ||
| type: 'string' | 'integer' | 'number' | 'boolean' | 'array' | 'object'; | ||
| required: boolean; | ||
| description: string; | ||
| } | ||
|
Comment on lines
+17
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Search for PayloadField class definition in Python files
rg -n -A 10 'class PayloadField' --type=pyRepository: rootflo/wavefront Length of output: 1255 Make The backend Change line 21 from: to: 🤖 Prompt for AI Agents |
||
|
|
||
| export interface PayloadSchema { | ||
| fields: PayloadField[]; | ||
| } | ||
|
|
||
| export interface ApiEndpoint { | ||
| id: string; | ||
| version: string; | ||
| path: string; | ||
| backend_path: string; | ||
| method: string; | ||
| description?: string; | ||
| additional_headers?: Record<string, string>; | ||
| backend_query_params?: Record<string, unknown>; | ||
| output_mapper_enabled: boolean; | ||
| output_mapper?: Record<string, string>; | ||
| payload_schema?: PayloadSchema; | ||
| } | ||
|
|
||
| export interface ApiServiceItem { | ||
|
|
||
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.
Improve the description text quality.
The description text "get users api" is lowercase and could be more professional and descriptive. Consider using proper capitalization and a more informative description.
🔎 Suggested improvements
Or alternatively:
📝 Committable suggestion
🤖 Prompt for AI Agents