@saltcorn/copilot 0.7.5 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/generate-js-action.js +43 -5
- package/actions/generate-tables.js +281 -96
- package/actions/generate-trigger.js +61 -0
- package/actions/generate-workflow.js +89 -37
- package/actions/install-plugin-action.js +103 -0
- package/agent-skills/database-design.js +139 -87
- package/agent-skills/install-plugin.js +111 -0
- package/agent-skills/js-action.js +183 -0
- package/agent-skills/pagegen.js +19 -6
- package/agent-skills/registry-editor.js +911 -0
- package/agent-skills/triggergen.js +263 -0
- package/agent-skills/viewgen.js +431 -29
- package/agent-skills/workflow.js +52 -2
- package/app-constructor/common.js +12 -0
- package/app-constructor/errors.js +102 -0
- package/app-constructor/feedback-action.js +175 -0
- package/app-constructor/feedback.js +112 -0
- package/app-constructor/progress.js +116 -0
- package/app-constructor/prompts.js +120 -0
- package/app-constructor/requirements.js +156 -0
- package/app-constructor/run_task.js +146 -0
- package/app-constructor/schema.js +199 -0
- package/app-constructor/taskchart.js +70 -0
- package/app-constructor/tasks.js +585 -0
- package/app-constructor/tools.js +81 -0
- package/app-constructor/view.js +209 -0
- package/builder-gen.js +590 -68
- package/builder-schema.js +26 -6
- package/chat-copilot.js +1 -0
- package/common.js +20 -0
- package/copilot-as-agent.js +7 -1
- package/index.js +23 -1
- package/js-code-gen.js +65 -0
- package/package.json +1 -1
- package/relation-paths.js +236 -0
- package/tests/builder-gen.test.js +56 -0
package/agent-skills/pagegen.js
CHANGED
|
@@ -57,7 +57,7 @@ class GeneratePageSkill {
|
|
|
57
57
|
`${name}.html`,
|
|
58
58
|
"text/html",
|
|
59
59
|
html,
|
|
60
|
-
user
|
|
60
|
+
user?.id,
|
|
61
61
|
100,
|
|
62
62
|
);
|
|
63
63
|
|
|
@@ -96,7 +96,7 @@ class GeneratePageSkill {
|
|
|
96
96
|
);
|
|
97
97
|
} else return "Metadata recieved";
|
|
98
98
|
},
|
|
99
|
-
postProcess: async ({ tool_call, generate }) => {
|
|
99
|
+
postProcess: async ({ tool_call, generate, req }) => {
|
|
100
100
|
const str = await generate(
|
|
101
101
|
`Now generate the contents of the ${tool_call.input.name} HTML page. If I asked you to embed a view,
|
|
102
102
|
use the <embed-view> self-closing tag to do so, setting the view name in the viewname attribute. For example,
|
|
@@ -120,6 +120,19 @@ class GeneratePageSkill {
|
|
|
120
120
|
? str.split("```html")[1].split("```")[0]
|
|
121
121
|
: str;
|
|
122
122
|
|
|
123
|
+
if (this.yoloMode) {
|
|
124
|
+
await this.userActions.build_copilot_page_gen({
|
|
125
|
+
user: req?.user,
|
|
126
|
+
name: tool_call.input.name,
|
|
127
|
+
title: tool_call.input.title,
|
|
128
|
+
description: tool_call.input.description,
|
|
129
|
+
html,
|
|
130
|
+
});
|
|
131
|
+
return {
|
|
132
|
+
stop: true,
|
|
133
|
+
add_response: `Page ${tool_call.input.name} created.`,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
123
136
|
return {
|
|
124
137
|
stop: true,
|
|
125
138
|
add_response: iframe({
|
|
@@ -127,10 +140,10 @@ class GeneratePageSkill {
|
|
|
127
140
|
width: 500,
|
|
128
141
|
height: 800,
|
|
129
142
|
}),
|
|
130
|
-
add_system_prompt: `If the user asks you to regenerate the page,
|
|
131
|
-
you must run the generate_page tool again. After running this tool
|
|
132
|
-
you will be prompted to generate the html again. You should repeat
|
|
133
|
-
the html from the previous answer except for the changes the user
|
|
143
|
+
add_system_prompt: `If the user asks you to regenerate the page,
|
|
144
|
+
you must run the generate_page tool again. After running this tool
|
|
145
|
+
you will be prompted to generate the html again. You should repeat
|
|
146
|
+
the html from the previous answer except for the changes the user
|
|
134
147
|
is requesting.`,
|
|
135
148
|
add_user_action: {
|
|
136
149
|
name: "build_copilot_page_gen",
|