@stagewise-plugins/angular
Advanced tools
+14
-8
@@ -108,11 +108,17 @@ "use strict"; | ||
| onContextElementSelect: getSelectedElementAnnotation, | ||
| onPromptSend: (prompt) => ({ | ||
| contextSnippets: [ | ||
| { | ||
| promptContextName: "elements-angular-component-info", | ||
| content: getSelectedElementsPrompt(prompt.contextElements) | ||
| } | ||
| ] | ||
| }) | ||
| onPromptSend: (prompt) => { | ||
| const content = getSelectedElementsPrompt(prompt.contextElements); | ||
| if (!content) { | ||
| return { contextSnippets: [] }; | ||
| } | ||
| return { | ||
| contextSnippets: [ | ||
| { | ||
| promptContextName: "elements-angular-component-info", | ||
| content | ||
| } | ||
| ] | ||
| }; | ||
| } | ||
| }; | ||
| exports.AngularPlugin = AngularPlugin; |
+14
-8
@@ -106,10 +106,16 @@ import { jsxs, jsx } from "@stagewise/toolbar/plugin-ui/jsx-runtime"; | ||
| onContextElementSelect: getSelectedElementAnnotation, | ||
| onPromptSend: (prompt) => ({ | ||
| contextSnippets: [ | ||
| { | ||
| promptContextName: "elements-angular-component-info", | ||
| content: getSelectedElementsPrompt(prompt.contextElements) | ||
| } | ||
| ] | ||
| }) | ||
| onPromptSend: (prompt) => { | ||
| const content = getSelectedElementsPrompt(prompt.contextElements); | ||
| if (!content) { | ||
| return { contextSnippets: [] }; | ||
| } | ||
| return { | ||
| contextSnippets: [ | ||
| { | ||
| promptContextName: "elements-angular-component-info", | ||
| content | ||
| } | ||
| ] | ||
| }; | ||
| } | ||
| }; | ||
@@ -116,0 +122,0 @@ export { |
+3
-3
| { | ||
| "name": "@stagewise-plugins/angular", | ||
| "version": "0.4.6", | ||
| "version": "0.4.7", | ||
| "type": "module", | ||
@@ -43,3 +43,3 @@ "keywords": [ | ||
| "preact": "^10.20.0", | ||
| "@stagewise/toolbar": "0.4.8" | ||
| "@stagewise/toolbar": "0.4.9" | ||
| }, | ||
@@ -54,3 +54,3 @@ "dependencies": {}, | ||
| "rollup-preserve-directives": "^1.0.0", | ||
| "@stagewise/toolbar": "0.4.8" | ||
| "@stagewise/toolbar": "0.4.9" | ||
| }, | ||
@@ -57,0 +57,0 @@ "scripts": { |
43813
0.52%247
5.11%