Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"features": {
"ghcr.io/devcontainers-extra/features/bun:1": {
"version": "1.1.0",
"resolved": "ghcr.io/devcontainers-extra/features/bun@sha256:0624284ecaead9dd4c6654616a7f939cfa4ebcbc60593700a74e35b1767befa5",
"integrity": "sha256:0624284ecaead9dd4c6654616a7f939cfa4ebcbc60593700a74e35b1767befa5"
}
}
}
25 changes: 25 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:5-24-trixie",
"features": {
"ghcr.io/devcontainers-extra/features/bun:1": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
36 changes: 0 additions & 36 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/core/src/plugin/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Effect } from "effect"
import { Location } from "../location"
import PROMPT_INITIALIZE from "./command/initialize.txt"
import PROMPT_REVIEW from "./command/review.txt"
import PROMPT_SCOTTY from "./command/scotty.txt"

export const Plugin = define({
id: "command",
Expand All @@ -20,6 +21,10 @@ export const Plugin = define({
command.description = "review changes [commit|branch|pr], defaults to uncommitted"
command.subtask = true
})
draft.update("scotty", (command) => {
command.template = PROMPT_SCOTTY
command.description = "print ascii art of a cute scottish terrier"
})
})
}),
})
8 changes: 8 additions & 0 deletions packages/core/src/plugin/command/scotty.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Generate an ASCII art illustration of a Scottish Terrier (Scottie dog) in the terminal.

Rules:
- Output only the ASCII art itself, no text or commentary before or after.
- Use a monospaced code block or plain text so the art aligns correctly.
- The illustration should show a dignified, stylized Scottie in profile or three-quarter view, recognizable by its distinctive silhouette: long head, erect ears, short legs, and a proud stance.
- Aim for roughly 12–18 lines tall and 40–60 characters wide.
- Use standard ASCII characters only (no Unicode box drawing).
5 changes: 5 additions & 0 deletions packages/core/test/plugin/command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ describe("CommandPlugin.Plugin", () => {
description: "review changes [commit|branch|pr], defaults to uncommitted",
subtask: true,
})
expect(yield* command.get("scotty")).toMatchObject({
name: "scotty",
description: "print ascii art of a cute scottish terrier",
})
expect((yield* command.get("scotty"))?.template).toContain("Scottish Terrier")
}),
)
})
11 changes: 11 additions & 0 deletions packages/opencode/src/command/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { MCP } from "../mcp"
import { Skill } from "../skill"
import PROMPT_INITIALIZE from "./template/initialize.txt"
import PROMPT_REVIEW from "./template/review.txt"
import PROMPT_SCOTTY from "./template/scotty.txt"
import { LegacyEvent } from "@opencode-ai/schema/legacy-event"

type State = {
Expand Down Expand Up @@ -46,6 +47,7 @@ export function hints(template: string) {
export const Default = {
INIT: "init",
REVIEW: "review",
SCOTTY: "scotty",
} as const

export interface Interface {
Expand Down Expand Up @@ -86,6 +88,15 @@ const layer = Layer.effect(
subtask: true,
hints: hints(PROMPT_REVIEW),
}
commands[Default.SCOTTY] = {
name: Default.SCOTTY,
description: "print ascii art of a cute scottish terrier",
source: "command",
get template() {
return PROMPT_SCOTTY
},
hints: hints(PROMPT_SCOTTY),
}

for (const [name, command] of Object.entries(cfg.command ?? {})) {
commands[name] = {
Expand Down
8 changes: 8 additions & 0 deletions packages/opencode/src/command/template/scotty.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Generate an ASCII art illustration of a Scottish Terrier (Scottie dog) in the terminal.

Rules:
- Output only the ASCII art itself, no text or commentary before or after.
- Use a monospaced code block or plain text so the art aligns correctly.
- The illustration should show a dignified, stylized Scottie in profile or three-quarter view, recognizable by its distinctive silhouette: long head, erect ears, short legs, and a proud stance.
- Aim for roughly 12–18 lines tall and 40–60 characters wide.
- Use standard ASCII characters only (no Unicode box drawing).
Loading
Loading