Skip to content

Commit

Permalink
Merge pull request #6 from docker/cm/multi-root
Browse files Browse the repository at this point in the history
fix relative paths for multi-workspace
  • Loading branch information
ColinMcNeil authored Jun 6, 2024
2 parents 35aeebd + 3541d36 commit 1103b53
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
13 changes: 13 additions & 0 deletions labs-make-runbook.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"folders": [
{
"path": "."
},
{
"path": "prompts"
}
],
"settings": {
"typescript.tsc.autoDetect": "off"
}
}
17 changes: 8 additions & 9 deletions prompts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```sh
#docker:command=builds
docker build -t vonwig/prompts -f prompts/Dockerfile prompts
docker build -t vonwig/prompts -f Dockerfile .
```

```sh
Expand Down Expand Up @@ -32,14 +32,14 @@ docker run vonwig/prompts prompts

## Custom prompts

1. create an empty directory add some example prompts like the ones [here](./v1).
1. create an empty directory add some example prompts like the ones [here](./v1).

Each prompt file is a moustache template. Ordering of prompts is
Each prompt file is a moustache template. Ordering of prompts is
determined by filename sorting. Each prompt filename must conform to one of
`.*_system_.*\.txt`, `.*_user_.*\.txt`, or `.*_assistant_.*\.txt`, depending
`.*_system_.*\.txt`, `.*_user_.*\.txt`, or `.*_assistant_.*\.txt`, depending
on the role of the message.

2. For custom prompts, a project directory can be mounted.
2. For custom prompts, a project directory can be mounted.

```sh
docker run \
Expand All @@ -54,7 +54,7 @@ docker run vonwig/prompts prompts
### Moustache Templates

The prompt templates can contain expressions like {{dockerfiles}} to add information
extracted from the current project. Examples of facts that can be added to the
extracted from the current project. Examples of facts that can be added to the
prompts are:

* `{{platform}}` - the platform of the current development environment.
Expand All @@ -63,7 +63,6 @@ prompts are:
* `{{project.dockerfiles}}` - the relative paths to local DockerFiles
* `{{project.composefiles}}` - the relative paths to local Docker Compose files.

The entire `project-facts` map is also available using dot-syntax
forms like `{{project-facts.project-root-uri}}`. All moustache template
The entire `project-facts` map is also available using dot-syntax
forms like `{{project-facts.project-root-uri}}`. All moustache template
expressions documented [here](https://github.com/yogthos/Selmer) are supported.

5 changes: 2 additions & 3 deletions prompts/npm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extractors:
- image: vonwig/extractor-node:latest
---

## Description
# Description

The prompts for docker rely only on the classic lsp project extraction function.

Expand All @@ -24,7 +24,7 @@ It relies on an image to extract some additional facts about the project

```sh
#docker:command=build-npm-extractor
docker build -t vonwig/extractor-node -f ./prompts/npm/Dockerfile ./prompts/npm
docker build -t vonwig/extractor-node -f ./npm/Dockerfile ./npm
```

## Running the extraction image
Expand All @@ -33,4 +33,3 @@ docker build -t vonwig/extractor-node -f ./prompts/npm/Dockerfile ./prompts/npm
#docker:command=run-npm-extractor
docker run --rm -v $PWD:/project:ro vonwig/extractor-node
```

0 comments on commit 1103b53

Please sign in to comment.