Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update prompts to 1.0, renames to js-prompts to match samples #1796

Merged
merged 1 commit into from
Feb 3, 2025
Merged
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
3 changes: 2 additions & 1 deletion samples/idx-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"options": {
"js-character-generator": "Simple Character Generator",
"js-coffee-shop": "Coffeeshop w Several types of Prompt",
"js-schoolAgent": "A Multi-Agent School Assistant"
"js-schoolAgent": "A Multi-Agent School Assistant",
"js-prompts": "A sample with various prompt styles"
}
}
]
Expand Down
43 changes: 43 additions & 0 deletions samples/js-prompts/.idx/dev.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## Default Nix Environment for Typescript + Gemini Examples
## Requires the sample to be started with npx run genkit:dev

# To learn more about how to use Nix to configure your environment
# see: https://developers.google.com/idx/guides/customize-idx-env
{ pkgs, ... }: {
# Which nixpkgs channel to use.
channel = "stable-24.05"; # or "unstable"
# Use https://search.nixos.org/packages to find packages
packages = [
pkgs.nodejs_20
pkgs.util-linux
];
# Sets environment variables in the workspace
env = {
#TODO Get a API key from https://g.co/ai/idxGetGeminiKey
GOOGLE_GENAI_API_KEY = "";
};
idx = {
# Search for the extensions you want on https://open-vsx.org/ and use "publisher.id"
extensions = [
];

# Workspace lifecycle hooks
workspace = {
# Runs when a workspace is first created
onCreate = {
npm-install = "npm ci --no-audit --prefer-offline --no-progress --timing";
default.openFiles = [ "README.md" "src/index.ts" ];
};
# Runs when the workspace is (re)started
onStart = {
run-server = "if [ -z \"\${GOOGLE_GENAI_API_KEY}\" ]; then \
echo 'No Gemini API key detected, enter a Gemini API key from https://aistudio.google.com/app/apikey:' && \
read -s GOOGLE_GENAI_API_KEY && \
echo 'You can also set the key in .idx/dev.nix to automatically add to your workspace'
export GOOGLE_GENAI_API_KEY; \
fi && \
npm run genkit:dev";
};
};
};
}
File renamed without changes.

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

Loading
Loading