codacus commited on
Commit
d4c4fe1
·
1 Parent(s): 719384c

feat: hyperlinked on "Start application" actionto switch to preview in workbench

Browse files
Files changed (1) hide show
  1. app/components/chat/Artifact.tsx +8 -2
app/components/chat/Artifact.tsx CHANGED
@@ -178,9 +178,15 @@ const ActionList = memo(({ actions }: ActionListProps) => {
178
  <span className="flex-1">Run command</span>
179
  </div>
180
  ) : type === 'start' ? (
181
- <div className="flex items-center w-full min-h-[28px]">
 
 
 
 
 
 
182
  <span className="flex-1">Start Application</span>
183
- </div>
184
  ) : null}
185
  </div>
186
  {(type === 'shell' || type === 'start') && (
 
178
  <span className="flex-1">Run command</span>
179
  </div>
180
  ) : type === 'start' ? (
181
+ <a
182
+ onClick={(e) => {
183
+ e.preventDefault();
184
+ workbenchStore.currentView.set('preview');
185
+ }}
186
+ className="flex items-center w-full min-h-[28px]"
187
+ >
188
  <span className="flex-1">Start Application</span>
189
+ </a>
190
  ) : null}
191
  </div>
192
  {(type === 'shell' || type === 'start') && (