Merge pull request #2 from oTToDev-CE/main
Browse files- .gitignore +1 -0
- README.md +1 -1
- app/routes/api.enhancer.ts +18 -2
- app/styles/components/resize-handle.scss +4 -2
- app/styles/index.scss +8 -8
- eslint.config.mjs +8 -2
- package-lock.json +0 -2
- package.json +0 -2
- pnpm-lock.yaml +0 -6
.gitignore
CHANGED
@@ -27,6 +27,7 @@ dist-ssr
|
|
27 |
/build
|
28 |
.env.local
|
29 |
.env
|
|
|
30 |
*.vars
|
31 |
.wrangler
|
32 |
_worker.bundle
|
|
|
27 |
/build
|
28 |
.env.local
|
29 |
.env
|
30 |
+
.dev.vars
|
31 |
*.vars
|
32 |
.wrangler
|
33 |
_worker.bundle
|
README.md
CHANGED
@@ -35,6 +35,7 @@ https://thinktank.ottomator.ai
|
|
35 |
- β
Load local projects into the app (@wonderwhy-er)
|
36 |
- β
Together Integration (@mouimet-infinisoft)
|
37 |
- β
Mobile friendly (@qwikode)
|
|
|
38 |
- β¬ **HIGH PRIORITY** - ALMOST DONE - Attach images to prompts (@atrokhym)
|
39 |
- β¬ **HIGH PRIORITY** - Prevent Bolt from rewriting files as often (file locking and diffs)
|
40 |
- β¬ **HIGH PRIORITY** - Better prompting for smaller LLMs (code window sometimes doesn't start)
|
@@ -43,7 +44,6 @@ https://thinktank.ottomator.ai
|
|
43 |
- β¬ Perplexity Integration
|
44 |
- β¬ Vertex AI Integration
|
45 |
- β¬ Deploy directly to Vercel/Netlify/other similar platforms
|
46 |
-
- β¬ Better prompt enhancing
|
47 |
- β¬ Have LLM plan the project in a MD file for better results/transparency
|
48 |
- β¬ VSCode Integration with git-like confirmations
|
49 |
- β¬ Upload documents for knowledge - UI design templates, a code base to reference coding style, etc.
|
|
|
35 |
- β
Load local projects into the app (@wonderwhy-er)
|
36 |
- β
Together Integration (@mouimet-infinisoft)
|
37 |
- β
Mobile friendly (@qwikode)
|
38 |
+
- β
Better prompt enhancing (@SujalXplores)
|
39 |
- β¬ **HIGH PRIORITY** - ALMOST DONE - Attach images to prompts (@atrokhym)
|
40 |
- β¬ **HIGH PRIORITY** - Prevent Bolt from rewriting files as often (file locking and diffs)
|
41 |
- β¬ **HIGH PRIORITY** - Better prompting for smaller LLMs (code window sometimes doesn't start)
|
|
|
44 |
- β¬ Perplexity Integration
|
45 |
- β¬ Vertex AI Integration
|
46 |
- β¬ Deploy directly to Vercel/Netlify/other similar platforms
|
|
|
47 |
- β¬ Have LLM plan the project in a MD file for better results/transparency
|
48 |
- β¬ VSCode Integration with git-like confirmations
|
49 |
- β¬ Upload documents for knowledge - UI design templates, a code base to reference coding style, etc.
|
app/routes/api.enhancer.ts
CHANGED
@@ -44,9 +44,25 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {
|
|
44 |
content:
|
45 |
`[Model: ${model}]\n\n[Provider: ${providerName}]\n\n` +
|
46 |
stripIndents`
|
|
|
|
|
47 |
I want you to improve the user prompt that is wrapped in \`<original_prompt>\` tags.
|
48 |
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
|
51 |
<original_prompt>
|
52 |
${message}
|
@@ -79,7 +95,7 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {
|
|
79 |
},
|
80 |
});
|
81 |
|
82 |
-
const transformedStream = result.
|
83 |
|
84 |
return new StreamingTextResponse(transformedStream);
|
85 |
} catch (error: unknown) {
|
|
|
44 |
content:
|
45 |
`[Model: ${model}]\n\n[Provider: ${providerName}]\n\n` +
|
46 |
stripIndents`
|
47 |
+
You are a professional prompt engineer specializing in crafting precise, effective prompts.
|
48 |
+
Your task is to enhance prompts by making them more specific, actionable, and effective.
|
49 |
I want you to improve the user prompt that is wrapped in \`<original_prompt>\` tags.
|
50 |
|
51 |
+
For valid prompts:
|
52 |
+
- Make instructions explicit and unambiguous
|
53 |
+
- Add relevant context and constraints
|
54 |
+
- Remove redundant information
|
55 |
+
- Maintain the core intent
|
56 |
+
- Ensure the prompt is self-contained
|
57 |
+
- Use professional language
|
58 |
+
For invalid or unclear prompts:
|
59 |
+
- Respond with a clear, professional guidance message
|
60 |
+
- Keep responses concise and actionable
|
61 |
+
- Maintain a helpful, constructive tone
|
62 |
+
- Focus on what the user should provide
|
63 |
+
- Use a standard template for consistency
|
64 |
+
IMPORTANT: Your response must ONLY contain the enhanced prompt text.
|
65 |
+
Do not include any explanations, metadata, or wrapper tags.
|
66 |
|
67 |
<original_prompt>
|
68 |
${message}
|
|
|
95 |
},
|
96 |
});
|
97 |
|
98 |
+
const transformedStream = result.toDataStream().pipeThrough(transformStream);
|
99 |
|
100 |
return new StreamingTextResponse(transformedStream);
|
101 |
} catch (error: unknown) {
|
app/styles/components/resize-handle.scss
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
[data-resize-handle] {
|
2 |
position: relative;
|
3 |
|
@@ -8,7 +10,7 @@
|
|
8 |
bottom: 0;
|
9 |
left: -6px;
|
10 |
right: -5px;
|
11 |
-
z-index:
|
12 |
}
|
13 |
|
14 |
&[data-panel-group-direction='vertical']:after {
|
@@ -18,7 +20,7 @@
|
|
18 |
right: 0;
|
19 |
top: -5px;
|
20 |
bottom: -6px;
|
21 |
-
z-index:
|
22 |
}
|
23 |
|
24 |
&[data-resize-handle-state='hover']:after,
|
|
|
1 |
+
@use '../z-index';
|
2 |
+
|
3 |
[data-resize-handle] {
|
4 |
position: relative;
|
5 |
|
|
|
10 |
bottom: 0;
|
11 |
left: -6px;
|
12 |
right: -5px;
|
13 |
+
z-index: z-index.$zIndexMax;
|
14 |
}
|
15 |
|
16 |
&[data-panel-group-direction='vertical']:after {
|
|
|
20 |
right: 0;
|
21 |
top: -5px;
|
22 |
bottom: -6px;
|
23 |
+
z-index: z-index.$zIndexMax;
|
24 |
}
|
25 |
|
26 |
&[data-resize-handle-state='hover']:after,
|
app/styles/index.scss
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
-
@
|
2 |
-
@
|
3 |
-
@
|
4 |
-
@
|
5 |
-
@
|
6 |
-
@
|
7 |
-
@
|
8 |
-
@
|
9 |
|
10 |
html,
|
11 |
body {
|
|
|
1 |
+
@use 'variables.scss';
|
2 |
+
@use 'z-index.scss';
|
3 |
+
@use 'animations.scss';
|
4 |
+
@use 'components/terminal.scss';
|
5 |
+
@use 'components/resize-handle.scss';
|
6 |
+
@use 'components/code.scss';
|
7 |
+
@use 'components/editor.scss';
|
8 |
+
@use 'components/toast.scss';
|
9 |
|
10 |
html,
|
11 |
body {
|
eslint.config.mjs
CHANGED
@@ -4,7 +4,13 @@ import { getNamingConventionRule, tsFileExtensions } from '@blitz/eslint-plugin/
|
|
4 |
|
5 |
export default [
|
6 |
{
|
7 |
-
ignores: [
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
},
|
9 |
...blitzPlugin.configs.recommended(),
|
10 |
{
|
@@ -38,7 +44,7 @@ export default [
|
|
38 |
patterns: [
|
39 |
{
|
40 |
group: ['../'],
|
41 |
-
message:
|
42 |
},
|
43 |
],
|
44 |
},
|
|
|
4 |
|
5 |
export default [
|
6 |
{
|
7 |
+
ignores: [
|
8 |
+
'**/dist',
|
9 |
+
'**/node_modules',
|
10 |
+
'**/.wrangler',
|
11 |
+
'**/bolt/build',
|
12 |
+
'**/.history',
|
13 |
+
],
|
14 |
},
|
15 |
...blitzPlugin.configs.recommended(),
|
16 |
{
|
|
|
44 |
patterns: [
|
45 |
{
|
46 |
group: ['../'],
|
47 |
+
message: 'Relative imports are not allowed. Please use \'~/\' instead.',
|
48 |
},
|
49 |
],
|
50 |
},
|
package-lock.json
CHANGED
@@ -77,9 +77,7 @@
|
|
77 |
"devDependencies": {
|
78 |
"@blitz/eslint-plugin": "0.1.0",
|
79 |
"@cloudflare/workers-types": "^4.20241127.0",
|
80 |
-
"@jridgewell/sourcemap-codec": "^1.5.0",
|
81 |
"@remix-run/dev": "^2.15.0",
|
82 |
-
"@rollup/plugin-inject": "^5.0.5",
|
83 |
"@types/diff": "^5.2.3",
|
84 |
"@types/file-saver": "^2.0.7",
|
85 |
"@types/js-cookie": "^3.0.6",
|
|
|
77 |
"devDependencies": {
|
78 |
"@blitz/eslint-plugin": "0.1.0",
|
79 |
"@cloudflare/workers-types": "^4.20241127.0",
|
|
|
80 |
"@remix-run/dev": "^2.15.0",
|
|
|
81 |
"@types/diff": "^5.2.3",
|
82 |
"@types/file-saver": "^2.0.7",
|
83 |
"@types/js-cookie": "^3.0.6",
|
package.json
CHANGED
@@ -99,9 +99,7 @@
|
|
99 |
"devDependencies": {
|
100 |
"@blitz/eslint-plugin": "0.1.0",
|
101 |
"@cloudflare/workers-types": "^4.20241127.0",
|
102 |
-
"@jridgewell/sourcemap-codec": "^1.5.0",
|
103 |
"@remix-run/dev": "^2.15.0",
|
104 |
-
"@rollup/plugin-inject": "^5.0.5",
|
105 |
"@types/diff": "^5.2.3",
|
106 |
"@types/file-saver": "^2.0.7",
|
107 |
"@types/js-cookie": "^3.0.6",
|
|
|
99 |
"devDependencies": {
|
100 |
"@blitz/eslint-plugin": "0.1.0",
|
101 |
"@cloudflare/workers-types": "^4.20241127.0",
|
|
|
102 |
"@remix-run/dev": "^2.15.0",
|
|
|
103 |
"@types/diff": "^5.2.3",
|
104 |
"@types/file-saver": "^2.0.7",
|
105 |
"@types/js-cookie": "^3.0.6",
|
pnpm-lock.yaml
CHANGED
@@ -216,15 +216,9 @@ importers:
|
|
216 |
'@cloudflare/workers-types':
|
217 |
specifier: ^4.20241127.0
|
218 |
version: 4.20241127.0
|
219 |
-
'@jridgewell/sourcemap-codec':
|
220 |
-
specifier: ^1.5.0
|
221 |
-
version: 1.5.0
|
222 |
'@remix-run/dev':
|
223 |
specifier: ^2.15.0
|
224 |
version: 2.15.0(@remix-run/[email protected]([email protected]([email protected]))([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected]))([email protected](@cloudflare/[email protected]))
|
225 |
-
'@rollup/plugin-inject':
|
226 |
-
specifier: ^5.0.5
|
227 |
-
version: 5.0.5([email protected])
|
228 |
'@types/diff':
|
229 |
specifier: ^5.2.3
|
230 |
version: 5.2.3
|
|
|
216 |
'@cloudflare/workers-types':
|
217 |
specifier: ^4.20241127.0
|
218 |
version: 4.20241127.0
|
|
|
|
|
|
|
219 |
'@remix-run/dev':
|
220 |
specifier: ^2.15.0
|
221 |
version: 2.15.0(@remix-run/[email protected]([email protected]([email protected]))([email protected])([email protected]))(@types/[email protected])([email protected])([email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected]))([email protected](@cloudflare/[email protected]))
|
|
|
|
|
|
|
222 |
'@types/diff':
|
223 |
specifier: ^5.2.3
|
224 |
version: 5.2.3
|