-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-simple.js
More file actions
50 lines (38 loc) · 1.22 KB
/
test-simple.js
File metadata and controls
50 lines (38 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Simple test without external dependencies
import { readFile, writeFile, mkdir } from 'fs/promises';
import { join } from 'path';
// Test basic conversion logic
async function testBasicConversion() {
console.log('🧪 Testing basic conversion (no dependencies)...\n');
const testDir = '/tmp/ai-command-test-simple';
await mkdir(testDir, { recursive: true });
// Create a simple Claude command
const claudeCommand = `---
title: "Test Command"
description: "A simple test"
params:
- name: topic
type: string
required: true
---
# Instructions
Write about {{topic}}.`;
await writeFile(join(testDir, 'test.md'), claudeCommand);
console.log('✅ Created test Claude command');
// Simulate conversion to TOML
const tomlContent = `# Generated by AI Command Converter
description = "A simple test"
prompt = """
Write about {{args.topic}}.
# USAGE:
# This command accepts the following arguments:
#
# REQUIRED:
# - topic (position 1): The topic
# Example: {{args.0}} or {{args.topic}}
"""`;
await writeFile(join(testDir, 'test.toml'), tomlContent);
console.log('✅ Created converted Gemini command');
console.log('\n📄 Files created in:', testDir);
}
testBasicConversion().catch(console.error);