Skip to content
Closed
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
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM oven/bun:latest

# Install Python, build tools for native modules, and Git for Husky
RUN apt-get update && apt-get install -y \
python3 \
build-essential \
git \
&& rm -rf /var/lib/apt/lists/*
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "OpenCode Bun Dev",
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"oven.bun-vscode"
]
}
},
"postCreateCommand": "bun install"
}
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
1 change: 1 addition & 0 deletions packages/opencode/src/command/template/scotty.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Output an ASCII image of a Scottish Terrier named Scotty. Make him as cute as you can.
Loading