File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import * as React from 'react' ;
2+ import type { LocalJSXCommandOnDone } from 'src/types/command.js' ;
3+ import type { ToolUseContext } from 'src/Tool.js' ;
4+ import { ArtifactsMenu } from './ArtifactsMenu.js' ;
5+ import { extractArtifacts } from './scanner.js' ;
6+
7+ export async function call ( onDone : LocalJSXCommandOnDone , context : ToolUseContext ) : Promise < React . ReactNode > {
8+ const messages = context . messages ?? [ ] ;
9+ const artifacts = extractArtifacts ( messages ) ;
10+ return < ArtifactsMenu artifacts = { artifacts } onExit = { onDone } /> ;
11+ }
Original file line number Diff line number Diff line change 1+ import type { Command } from '../../commands.js'
2+
3+ const artifacts = {
4+ type : 'local-jsx' ,
5+ name : 'artifacts' ,
6+ description :
7+ 'List HTML artifacts uploaded to cloud-artifacts in this session' ,
8+ isEnabled : ( ) => true ,
9+ userFacingName : ( ) => 'Artifacts' ,
10+ load : ( ) => import ( './artifacts.js' ) ,
11+ } satisfies Command
12+
13+ export default artifacts
You can’t perform that action at this time.
0 commit comments