diff --git a/.gitignore b/.gitignore index 0a37de2..2624516 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ node_modules *.vsix /.clj-kondo/ /.lsp/ +**/.direnv/ +**/result /prompts/prompts.jar /prompts/codescope/.direnv/ /prompts/codescope/result diff --git a/prompts/dockerfiles/README.md b/prompts/dockerfiles/README.md index fb7219e..5c5f962 100644 --- a/prompts/dockerfiles/README.md +++ b/prompts/dockerfiles/README.md @@ -42,7 +42,7 @@ functions: type: string description: the name docker image repository container: - image: vonwig/function_docker_scout_tag_recommendations:latest + image: vonwig/function_docker_scout_tag_recommendation:latest --- # Background diff --git a/prompts/codescope/.envrc b/prompts/functions/codescope/.envrc similarity index 100% rename from prompts/codescope/.envrc rename to prompts/functions/codescope/.envrc diff --git a/prompts/codescope/Dockerfile b/prompts/functions/codescope/Dockerfile similarity index 100% rename from prompts/codescope/Dockerfile rename to prompts/functions/codescope/Dockerfile diff --git a/prompts/codescope/clipboard.nix b/prompts/functions/codescope/clipboard.nix similarity index 100% rename from prompts/codescope/clipboard.nix rename to prompts/functions/codescope/clipboard.nix diff --git a/prompts/codescope/derivation.nix b/prompts/functions/codescope/derivation.nix similarity index 100% rename from prompts/codescope/derivation.nix rename to prompts/functions/codescope/derivation.nix diff --git a/prompts/codescope/flake.lock b/prompts/functions/codescope/flake.lock similarity index 100% rename from prompts/codescope/flake.lock rename to prompts/functions/codescope/flake.lock diff --git a/prompts/codescope/flake.nix b/prompts/functions/codescope/flake.nix similarity index 100% rename from prompts/codescope/flake.nix rename to prompts/functions/codescope/flake.nix diff --git a/prompts/codescope/runbook.md b/prompts/functions/codescope/runbook.md similarity index 100% rename from prompts/codescope/runbook.md rename to prompts/functions/codescope/runbook.md diff --git a/prompts/functions/docker_scout_tag_recommendation/.envrc b/prompts/functions/docker_scout_tag_recommendation/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/prompts/functions/docker_scout_tag_recommendation/.envrc @@ -0,0 +1 @@ +use flake diff --git a/prompts/functions/docker_scout_tag_recommendation/Dockerfile b/prompts/functions/docker_scout_tag_recommendation/Dockerfile new file mode 100644 index 0000000..b515080 --- /dev/null +++ b/prompts/functions/docker_scout_tag_recommendation/Dockerfile @@ -0,0 +1,36 @@ + +# syntax = docker/dockerfile:1.4 +FROM nixos/nix:2.21.1@sha256:3f6c77ee4d2c82e472e64e6cd7087241dc391421a0b42c22e6849c586d5398d9 AS builder + +WORKDIR /tmp/build +RUN mkdir /tmp/nix-store-closure + +# ignore SC2046 because the output of nix-store -qR will never have spaces - this is safe here +# hadolint ignore=SC2046 +RUN --mount=type=cache,target=/nix,from=nixos/nix:2.21.1,source=/nix \ + --mount=type=cache,target=/root/.cache \ + --mount=type=bind,target=/tmp/build \ + <! c {:content output :role "tool" :tool_call_id tool-call-id}) (async/close! c))) :fail (fn [output] - (jsonrpc/notify :message {:content (format "## ROLE tool\n function call %s failed %s" function-name output)}) + (jsonrpc/notify :message {:content (format "\n## ROLE tool\n function call %s failed %s" function-name output)}) (async/go (async/>! c {:content output :role "tool" :tool_call_id tool-call-id}) (async/close! c)))}) diff --git a/prompts/src/prompts.clj b/prompts/src/prompts.clj index 68eb394..d3c9d32 100644 --- a/prompts/src/prompts.clj +++ b/prompts/src/prompts.clj @@ -209,10 +209,10 @@ (let [{:keys [messages finish-reason] :as m} (async/