diff --git a/e2e/playwright/prompt-to-edit.spec.ts b/e2e/playwright/prompt-to-edit.spec.ts
index 7950b2d17..dd89db369 100644
--- a/e2e/playwright/prompt-to-edit.spec.ts
+++ b/e2e/playwright/prompt-to-edit.spec.ts
@@ -12,10 +12,10 @@ profile001 = startProfileAt([57.81, 250.51], sketch001)
|> close()
extrude001 = extrude(profile001, length = 200)
sketch002 = startSketchOn('XZ')
- |> startProfileAt([-73.64, -42.89], %)
- |> xLine(173.71, %)
- |> line(end = [-22.12, -94.4])
- |> xLine(-156.98, %)
+ |> startProfileAt([-114, 85.52], %)
+ |> xLine(265.36, %)
+ |> line(end = [33.17, -261.22])
+ |> xLine(-297.25, %)
|> line(endAbsolute = [profileStartX(%), profileStartY(%)])
|> close()
extrude002 = extrude(sketch002, length = 50)
@@ -62,8 +62,8 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
await homePage.goToModelingScene()
await scene.waitForExecutionDone()
- const body1CapCoords = { x: 571, y: 351 }
- const greenCheckCoords = { x: 565, y: 345 }
+ const body1CapCoords = { x: 571, y: 311 }
+ const greenCheckCoords = { x: 565, y: 305 }
const body2WallCoords = { x: 609, y: 153 }
const [clickBody1Cap] = scene.makeMouseHelpers(
body1CapCoords.x,
@@ -88,7 +88,7 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
await scene.expectPixelColor(yellow, body1CapCoords, 20)
await editor.expectState({
highlightedCode: '',
- activeLines: ['|>startProfileAt([-73.64,-42.89],%)'],
+ activeLines: ['|>startProfileAt([-114,85.52],%)'],
diagnostics: [],
})
})
@@ -157,7 +157,7 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
await homePage.goToModelingScene()
await scene.waitForExecutionDone()
- const body1CapCoords = { x: 571, y: 351 }
+ const body1CapCoords = { x: 571, y: 311 }
const [clickBody1Cap] = scene.makeMouseHelpers(
body1CapCoords.x,
body1CapCoords.y
@@ -176,7 +176,7 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
await editor.expectState({
highlightedCode: '',
- activeLines: ['|>startProfileAt([-73.64,-42.89],%)'],
+ activeLines: ['|>startProfileAt([-114,85.52],%)'],
diagnostics: [],
})
})
@@ -204,7 +204,7 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
page,
scene,
}) => {
- const body1CapCoords = { x: 571, y: 351 }
+ const body1CapCoords = { x: 571, y: 311 }
await context.addInitScript((file) => {
localStorage.setItem('persistCode', file)
@@ -263,7 +263,7 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
page,
scene,
}) => {
- const body1CapCoords = { x: 571, y: 351 }
+ const body1CapCoords = { x: 571, y: 311 }
const body2WallCoords = { x: 620, y: 152 }
const [clickBody1Cap] = scene.makeMouseHelpers(
body1CapCoords.x,
@@ -299,7 +299,7 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
// Hold shift and select second body
await editor.expectState({
highlightedCode: '',
- activeLines: ['|>startProfileAt([-73.64,-42.89],%)'],
+ activeLines: ['|>startProfileAt([-114,85.52],%)'],
diagnostics: [],
})
await page.keyboard.down('Shift')
@@ -310,7 +310,7 @@ test.describe('Prompt-to-edit tests', { tag: '@skipWin' }, () => {
'line(end=[121.13,56.63],tag=$seg02)extrude(profile001,length=200)',
activeLines: [
'|>line(end=[121.13,56.63],tag=$seg02)',
- '|>startProfileAt([-73.64,-42.89],%)',
+ '|>startProfileAt([-114,85.52],%)',
],
diagnostics: [],
})
diff --git a/src/components/ToastTextToCad.tsx b/src/components/ToastTextToCad.tsx
index 6ebd5177d..c4d90babb 100644
--- a/src/components/ToastTextToCad.tsx
+++ b/src/components/ToastTextToCad.tsx
@@ -33,12 +33,50 @@ import { EventFrom } from 'xstate'
import { fileMachine } from 'machines/fileMachine'
import { reportRejection } from 'lib/trap'
import { codeManager, kclManager } from 'lib/singletons'
+import { openExternalBrowserIfDesktop } from 'lib/openWindow'
const CANVAS_SIZE = 128
const PROMPT_TRUNCATE_LENGTH = 128
const FRUSTUM_SIZE = 0.5
const OUTPUT_KEY = 'source.glb'
+function TextToCadImprovementMessage({
+ label,
+ ...rest
+}: React.HTMLAttributes
+ Text-to-CAD is a new ML model. There will be prompts that work and
+ prompts that don't and prompts that generate something a little bit off.
+ Sometimes even a small tweak to your prompt will make it better on the
+ next run. Try our prompt-to-edit feature to iterate on your result with
+ AI. We look at all the failures to make the model better and see our
+ weaknesses. Over time the model will get better. See our{' '}
+
+ Discord
+ {' '}
+ or{' '}
+
+ Discourse
+ {' '}
+ or some prompting tips from the community or our team.
+
+ {label}
+
+
Do you want to keep the change?