repositories / pi-ext
pi-ext
bugabingas pi extensions
owned by admin
extensions/clipboard/demo/scene.json
Raw{
"title": "clipboard",
"extensions": ["clipboard"],
"cols": 100,
"rows": 28,
"settings": { "defaultTools": ["+codemode"], "cacheWarming": "off" },
"files": {
"fixture.ts": "import {dirname,join} from 'node:path'; import {pathToFileURL} from 'node:url'; export default async pi => {const {default:fixture}=await import(pathToFileURL(join(dirname(process.env.PI_DEMO_SCENE),'fixture.ts')).href); return fixture(pi);};\n"
},
"args": ["-e", "./fixture.ts"],
"turns": [
{
"tool": {
"name": "codemode",
"arguments": {
"code": "const command = 'mise run //:check'; const copied = await tools.clipboard({ action: 'copy', text: command }); const pasted = await tools.clipboard({ action: 'read' }); if (pasted.text !== command) throw new Error('Clipboard round-trip mismatch'); text({ copiedBytes: copied.bytes, exactMatch: pasted.text === command });"
}
}
},
{
"text": "Verified clipboard round-trip.\n\nCopied `mise run //:check`, read it back, and confirmed an exact match.\nClipboard content is accessed only when requested."
}
],
"steps": [
{ "expect": "demo-model", "hold": 6 },
{
"type": "Copy my check command to the clipboard, then verify it.",
"key": "enter",
"fresh": true,
"expect": "Verified clipboard round-trip",
"hold": 8
},
{ "key": "ctrl-o", "expect": "exactMatch", "hold": 8 },
{ "key": "ctrl-c", "hold": 0.3 },
{ "key": "ctrl-c" }
]
}