Skip to content

Commit

Permalink
[shared-ui] Only show quick add for context-only nodes (#4273)
Browse files Browse the repository at this point in the history
Fixes #4271
  • Loading branch information
paullewis authored Jan 30, 2025
1 parent 30b8f91 commit 4fc44ab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/forty-cougars-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@breadboard-ai/shared-ui": patch
---

Only show quick add for context-only nodes
7 changes: 6 additions & 1 deletion packages/shared-ui/src/elements/editor/graph-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,12 @@ export class GraphNode extends PIXI.Container {
}

#drawQuickAddIfNeeded() {
if (!this.selected || this.#isConnectedOut() || !this.#canShowQuickAdd) {
if (
!this.selected ||
this.#isConnectedOut() ||
!this.#canShowQuickAdd ||
!this.#isContextOnly()
) {
this.#quickAdd.removeFromParent();
return;
}
Expand Down

0 comments on commit 4fc44ab

Please sign in to comment.