From 6e6a7419f28f3994a9627f4dfc5c740ebbc62b04 Mon Sep 17 00:00:00 2001 From: claude-code-best Date: Sat, 20 Jun 2026 16:57:59 +0800 Subject: [PATCH] feat(artifact): add /artifacts slash command entry Co-Authored-By: glm-5.2 --- src/commands/artifacts/artifacts.tsx | 11 +++++++++++ src/commands/artifacts/index.ts | 13 +++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/commands/artifacts/artifacts.tsx create mode 100644 src/commands/artifacts/index.ts diff --git a/src/commands/artifacts/artifacts.tsx b/src/commands/artifacts/artifacts.tsx new file mode 100644 index 000000000..a103ca726 --- /dev/null +++ b/src/commands/artifacts/artifacts.tsx @@ -0,0 +1,11 @@ +import * as React from 'react'; +import type { LocalJSXCommandOnDone } from 'src/types/command.js'; +import type { ToolUseContext } from 'src/Tool.js'; +import { ArtifactsMenu } from './ArtifactsMenu.js'; +import { extractArtifacts } from './scanner.js'; + +export async function call(onDone: LocalJSXCommandOnDone, context: ToolUseContext): Promise { + const messages = context.messages ?? []; + const artifacts = extractArtifacts(messages); + return ; +} diff --git a/src/commands/artifacts/index.ts b/src/commands/artifacts/index.ts new file mode 100644 index 000000000..15065058c --- /dev/null +++ b/src/commands/artifacts/index.ts @@ -0,0 +1,13 @@ +import type { Command } from '../../commands.js' + +const artifacts = { + type: 'local-jsx', + name: 'artifacts', + description: + 'List HTML artifacts uploaded to cloud-artifacts in this session', + isEnabled: () => true, + userFacingName: () => 'Artifacts', + load: () => import('./artifacts.js'), +} satisfies Command + +export default artifacts