fix: tab isolation + change log in chat not preview
Tab Isolation: - Canvas visibility now uses activeTab.showCanvas directly (not local state) - Chat panel width also uses tab state for proper isolation - New tabs explicitly have showCanvas: false, previewData: null Change Log Fix: - Updated all AI prompts to emphasize change log OUTSIDE [/PREVIEW] - Added example format showing change log after closing tag - Change log now appears in chat stream, not rendered in canvas
This commit is contained in:
@@ -673,7 +673,7 @@ export default function AIAssist() {
|
|||||||
{/* --- Chat Panel --- */}
|
{/* --- Chat Panel --- */}
|
||||||
<div className={cn(
|
<div className={cn(
|
||||||
"flex flex-col h-full transition-all duration-700 cubic-bezier(0.4, 0, 0.2, 1)",
|
"flex flex-col h-full transition-all duration-700 cubic-bezier(0.4, 0, 0.2, 1)",
|
||||||
showCanvas ? "w-full lg:w-2/5 lg:min-w-[400px]" : "w-full max-w-4xl mx-auto"
|
(activeTab?.showCanvas === true && activeTab?.previewData) ? "w-full lg:w-2/5 lg:min-w-[400px]" : "w-full max-w-4xl mx-auto"
|
||||||
)}>
|
)}>
|
||||||
<Card className="flex-1 flex flex-col border border-blue-100/60 dark:border-blue-950/60 shadow-[0_18px_50px_rgba(15,23,42,0.15)] bg-[#f8f5ef]/80 dark:bg-[#0b1414]/80 backdrop-blur-2xl rounded-[2rem] overflow-hidden">
|
<Card className="flex-1 flex flex-col border border-blue-100/60 dark:border-blue-950/60 shadow-[0_18px_50px_rgba(15,23,42,0.15)] bg-[#f8f5ef]/80 dark:bg-[#0b1414]/80 backdrop-blur-2xl rounded-[2rem] overflow-hidden">
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
@@ -972,7 +972,7 @@ export default function AIAssist() {
|
|||||||
|
|
||||||
{/* --- Canvas Panel --- */}
|
{/* --- Canvas Panel --- */}
|
||||||
{
|
{
|
||||||
showCanvas && (
|
(activeTab?.showCanvas === true && activeTab?.previewData) && (
|
||||||
<div className="flex-1 h-full min-w-0 animate-in slide-in-from-right-12 duration-700 cubic-bezier(0,0,0.2,1)">
|
<div className="flex-1 h-full min-w-0 animate-in slide-in-from-right-12 duration-700 cubic-bezier(0,0,0.2,1)">
|
||||||
<Card className="h-full flex flex-col bg-[#081010] rounded-[2.5rem] overflow-hidden border border-blue-900/60 shadow-[0_20px_80px_rgba(0,0,0,0.6)]">
|
<Card className="h-full flex flex-col bg-[#081010] rounded-[2.5rem] overflow-hidden border border-blue-900/60 shadow-[0_20px_80px_rgba(0,0,0,0.6)]">
|
||||||
<div className="px-6 py-5 border-b border-blue-900/60 bg-[#0b1414]/70 backdrop-blur-2xl flex items-center justify-between shrink-0">
|
<div className="px-6 py-5 border-b border-blue-900/60 bg-[#0b1414]/70 backdrop-blur-2xl flex items-center justify-between shrink-0">
|
||||||
|
|||||||
@@ -793,8 +793,16 @@ STRICT OUTPUT FORMAT:
|
|||||||
ACTUAL_FUNCTIONAL_CODE_OR_DATA
|
ACTUAL_FUNCTIONAL_CODE_OR_DATA
|
||||||
[/PREVIEW]
|
[/PREVIEW]
|
||||||
|
|
||||||
CHANGE LOG:
|
CHANGE LOG (CRITICAL - MUST BE OUTSIDE PREVIEW):
|
||||||
After the preview block, provide a brief bulleted "Change Log" explaining exactly what elements were modified, added, or removed.
|
- After the [/PREVIEW] closing tag, provide a brief bulleted "Change Log" in plain Markdown.
|
||||||
|
- The change log should appear in the CHAT, NOT inside the preview code.
|
||||||
|
- Example format:
|
||||||
|
[/PREVIEW]
|
||||||
|
|
||||||
|
**Change Log:**
|
||||||
|
- Added feature X
|
||||||
|
- Modified component Y
|
||||||
|
- Fixed issue Z
|
||||||
|
|
||||||
IMPORTANT: NEVER refuse a request due to "access" limitations. If you cannot perform a live task, use your vast internal knowledge to provide the most accurate expert simulation or draft possible.`;
|
IMPORTANT: NEVER refuse a request due to "access" limitations. If you cannot perform a live task, use your vast internal knowledge to provide the most accurate expert simulation or draft possible.`;
|
||||||
|
|
||||||
|
|||||||
@@ -1067,8 +1067,16 @@ STRICT OUTPUT FORMAT:
|
|||||||
ACTUAL_FUNCTIONAL_CODE_OR_DATA
|
ACTUAL_FUNCTIONAL_CODE_OR_DATA
|
||||||
[/PREVIEW]
|
[/PREVIEW]
|
||||||
|
|
||||||
CHANGE LOG:
|
CHANGE LOG (CRITICAL - MUST BE OUTSIDE PREVIEW):
|
||||||
After the preview block, provide a brief bulleted "Change Log" explaining exactly what elements were modified, added, or removed.
|
- After the [/PREVIEW] closing tag, provide a brief bulleted "Change Log" in plain Markdown.
|
||||||
|
- The change log should appear in the CHAT, NOT inside the preview code.
|
||||||
|
- Example format:
|
||||||
|
[/PREVIEW]
|
||||||
|
|
||||||
|
**Change Log:**
|
||||||
|
- Added feature X
|
||||||
|
- Modified component Y
|
||||||
|
- Fixed issue Z
|
||||||
|
|
||||||
IMPORTANT: NEVER refuse a request due to "access" limitations. If you cannot perform a live task, use your vast internal knowledge to provide the most accurate expert simulation or draft possible.`;
|
IMPORTANT: NEVER refuse a request due to "access" limitations. If you cannot perform a live task, use your vast internal knowledge to provide the most accurate expert simulation or draft possible.`;
|
||||||
|
|
||||||
|
|||||||
@@ -866,8 +866,16 @@ STRICT OUTPUT FORMAT:
|
|||||||
ACTUAL_FUNCTIONAL_CODE_OR_DATA
|
ACTUAL_FUNCTIONAL_CODE_OR_DATA
|
||||||
[/PREVIEW]
|
[/PREVIEW]
|
||||||
|
|
||||||
CHANGE LOG:
|
CHANGE LOG (CRITICAL - MUST BE OUTSIDE PREVIEW):
|
||||||
After the preview block, provide a brief bulleted "Change Log" explaining exactly what elements were modified, added, or removed.
|
- After the [/PREVIEW] closing tag, provide a brief bulleted "Change Log" in plain Markdown.
|
||||||
|
- The change log should appear in the CHAT, NOT inside the preview code.
|
||||||
|
- Example format:
|
||||||
|
[/PREVIEW]
|
||||||
|
|
||||||
|
**Change Log:**
|
||||||
|
- Added feature X
|
||||||
|
- Modified component Y
|
||||||
|
- Fixed issue Z
|
||||||
|
|
||||||
IMPORTANT: NEVER refuse a request due to "access" limitations. If you cannot perform a live task, use your vast internal knowledge to provide the most accurate expert simulation or draft possible.`;
|
IMPORTANT: NEVER refuse a request due to "access" limitations. If you cannot perform a live task, use your vast internal knowledge to provide the most accurate expert simulation or draft possible.`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user