Skip to content

Commit f7ae155

Browse files
Add names to tiles
1 parent 567ad41 commit f7ae155

File tree

5 files changed

+31
-8
lines changed

5 files changed

+31
-8
lines changed

prompts/examples/ffmpeg.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,36 @@
11
---
2+
name: "ffmpeg - convert to gif"
23
tools:
34
- name: imagemagick
45
- name: ffmpeg
56
description: run the ffmpeg command
67
parameters:
78
type: object
89
properties:
10+
basedir:
11+
type: string
912
args:
1013
description: arguments to pass to ffmpeg
1114
type: array
1215
items:
1316
type: string
1417
container:
1518
image: linuxserver/ffmpeg:version-7.1-cli
19+
volumes:
20+
- "{{basedir|safe}}:{{basedir|safe}}"
1621
command:
1722
- "{{args|into}}"
23+
model: claude-3-5-sonnet-20241022
1824
---
1925

2026
# prompt user
2127

22-
Use ffmpeg to convert the file UsingPuppeteer.mp4 into an animated gif file at 1 frame per second.
23-
The output file should be named UsingPuppeteer.gif.
28+
You will convert /Users/slim/vids/UsingPuppeteer.mp4 to a gif using ffmpeg.
29+
30+
Figure out the basedir for this file and use that as the basedir parameter when running ffmpeg.
31+
32+
Use ffmpeg to convert this file to an animated gif. The output .gif file should be written to the /thread directory and the filename
33+
should be the same as the input file but with the file extension .gif.
34+
35+
Then count the number of frames in the output .gif file.
2436

25-
Then count the number of frames in UsingPuppeteer.gif.

prompts/examples/hello_world.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: hello from Docker
2+
name: hello Docker
33
description: send a greeting from Docker
44
model: claude-3-5-sonnet-20241022
55
tools:
@@ -20,5 +20,5 @@ tools:
2020

2121
# prompt user
2222

23-
Ask the user what kind of a greeting they'd like to receive.
23+
Ask what kind of a greeting I'd like to receive.
2424
Once you have the answer, generate a greeting and send it to Docker.

prompts/examples/mcp-sqlite.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
name: mcp-sqlite
23
description: A prompt to seed the database with initial data and demonstrate what you can do with an SQLite MCP Server + Claude
34
model: claude-3-5-sonnet-20241022
45
tools:

src/jsonrpc/db.clj

+8-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@
1010
(defn get-prompt-data [{:keys [register] :as opts}]
1111
(logger/info "get-prompt-data " register)
1212
(->> register
13-
(map (fn [ref] [ref (git/prompt-file ref)]))
13+
(map (fn [ref]
14+
[ref
15+
(try
16+
(git/prompt-file ref)
17+
(catch Throwable t
18+
(logger/error t (format "missing ref %s" ref))
19+
:missing))]))
20+
(filter (complement #(= :missing (second %))))
1421
(map (fn [[ref f]]
1522
(let [m (prompts/get-prompts (assoc opts :prompts f))]
1623
[(or (-> m :metadata :name) ref) m])))

src/jsonrpc/server.clj

+6-2
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,23 @@
118118
:messages (prompt-function (or arguments {}))}))
119119

120120
(defmethod lsp.server/receive-request "resources/list" [_ _ _]
121+
(logger/info "resources/list")
121122
{:resources []})
122123

123-
(defmethod lsp.server/receive-request "resources/read" [_ _ _]
124+
(defmethod lsp.server/receive-request "resources/read" [_ _ params]
125+
(logger/info "resouces/read" params)
124126
{:contents []})
125127

126128
(defmethod lsp.server/receive-request "resources/templates/list" [_ _ _]
129+
(logger/info "resources/templates/list")
127130
{:resource-templates
128131
;; uriTemplate, name, description, mimeType
129132
;; uriTemplates have parameters like {path}
130133
;; example: "file:///{path}
131134
[]})
132135

133-
(defmethod lsp.server/receive-request "resources/subscribe" [_ _ _]
136+
(defmethod lsp.server/receive-request "resources/subscribe" [_ _ params]
137+
(logger/info "resources/subscribe" params)
134138
{:resource-templates []})
135139

136140
(defmethod lsp.server/receive-request "tools/list" [_ {:keys [db*]} _]

0 commit comments

Comments
 (0)