-
Notifications
You must be signed in to change notification settings - Fork 626
feat: introduce propose change tool template #17164
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
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Your preview environment pr-17164 has been deployed with errors. |
042c480
to
ea597d6
Compare
c786248
to
7ac5b63
Compare
7ac5b63
to
572d275
Compare
572d275
to
3b08a34
Compare
Preview environment logs can be accessed at: https://console.cloud.google.com/logs/query;query=resource.labels.namespace_name%3D%22pr-17164%22;duration=PT30M?project=lightdash-previews |
You can ssh into the preview environment by running: |
3b08a34
to
fa68e00
Compare
Preview environment logs can be accessed at: https://console.cloud.google.com/logs/query;query=resource.labels.namespace_name%3D%22pr-17164%22;duration=PT30M?project=lightdash-previews |
You can ssh into the preview environment by running: |
fa68e00
to
ea267a6
Compare
ea267a6
to
64388f8
Compare
64388f8
to
66b0a29
Compare
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.
Sequence Diagram
sequenceDiagram
participant User
participant AssistantBubble as "AgentChatAssistantBubble"
participant AiProposeChangeToolCall as "AiProposeChangeToolCall"
participant ChangeRenderer as "ChangeRenderer"
participant OperationRenderer as "OperationRenderer"
participant SupportElements as "SupportElements"
User->>AssistantBubble: "Views AI assistant message"
AssistantBubble->>AssistantBubble: "Extract proposeChangeToolCall from message/stream"
alt proposeChangeToolCall exists
AssistantBubble->>AiProposeChangeToolCall: "Render tool call with change & entityTableName"
AiProposeChangeToolCall->>AiProposeChangeToolCall: "Create collapsible container with change type badge"
alt Container is expanded
AiProposeChangeToolCall->>ChangeRenderer: "Render change based on entityType"
alt entityType is 'table'
ChangeRenderer->>SupportElements: "Render TableBreadcrumb"
ChangeRenderer->>OperationRenderer: "Render operations for each patch field"
else entityType is 'dimension'
ChangeRenderer->>SupportElements: "Render FieldBreadcrumb with dimension info"
ChangeRenderer->>OperationRenderer: "Render operations for each patch field"
else entityType is 'metric'
ChangeRenderer->>SupportElements: "Render FieldBreadcrumb with metric info"
ChangeRenderer->>OperationRenderer: "Render operations for each patch field"
end
loop For each operation
OperationRenderer->>OperationRenderer: "Render replace operation with field name and value"
end
end
end
10 files reviewed, 2 comments
...ures/aiCopilot/components/ChatElements/ToolCalls/AiProposeChangeToolCall/SupportElements.tsx
Show resolved
Hide resolved
...ures/aiCopilot/components/ChatElements/ToolCalls/AiProposeChangeToolCall/SupportElements.tsx
Outdated
Show resolved
Hide resolved
Preview environment logs can be accessed at: https://console.cloud.google.com/logs/query;query=resource.labels.namespace_name%3D%22pr-17164%22;duration=PT30M?project=lightdash-previews |
You can ssh into the preview environment by running: |
66b0a29
to
83fa532
Compare
const proposeChangeToolCall = isStreaming | ||
? (streamingState?.toolCalls.find((t) => t.toolName === 'proposeChange') | ||
?.toolArgs as ToolProposeChangeArgs) | ||
: (message.toolCalls.find((t) => t.toolName === 'proposeChange') | ||
?.toolArgs as ToolProposeChangeArgs); // TODO: fix message type, it's `object` now | ||
|
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.
For later: find a way to avoid "as" and use Tool call zod schemas
@@ -0,0 +1,212 @@ | |||
import '@mantine-8/core/styles.css'; |
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.
move to stories
|
||
type OperationRendererProps = { | ||
operation: Operation; | ||
fieldName: string; |
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.
from offline convo: call "property" instead of "field"/"fieldName" to avoid mixing other parts in the codebase mentioning field, which is usually a queryable object(dim,metric,tablecalc...)
83fa532
to
70b13af
Compare
@@ -1,3 +1,5 @@ | |||
import '@mantine-8/core/styles.css'; |
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.
Import path violation: Replace '@mantine-8/core/styles.css'
with the standard Mantine import path '@mantine/core/styles.css'
. The frontend development guidelines require using standard Mantine import paths for the base UI library.
import '@mantine-8/core/styles.css'; | |
import '@mantine/core/styles.css'; |
Spotted by Diamond (based on custom rule: packages/frontend rules)
Is this helpful? React 👍 or 👎 to let us know.
70b13af
to
7e48d98
Compare
Merge activity
|
7e48d98
to
ddf7b44
Compare
# [0.2039.0](0.2038.1...0.2039.0) (2025-10-02) ### Features * introduce propose change tool template ([#17164](#17164)) ([9d63834](9d63834))
🎉 This PR is included in version 0.2039.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Description:
This PR adds a UI component to display proposed changes tool calls in the UI.
AiProposeChangeToolCall
component to render proposed changesstories
file to test multiple variants of the component without the need to prompt ai