Skip to content

Commit

Permalink
feat: updated template variables in prompt template
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldziher committed Jan 10, 2024
1 parent f443882 commit c42085d
Show file tree
Hide file tree
Showing 7 changed files with 328 additions and 238 deletions.
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"fast-deep-equal": "^3.1.3",
"firebase": "^10.7.1",
"next": "14.0.4",
"next-intl": "^3.4.1",
"next-intl": "^3.4.2",
"persist-and-sync": "^1.2.1",
"react": "18.2.0",
"react-bootstrap-icons": "^1.10.3",
Expand All @@ -45,7 +45,7 @@
"@types/react": "18.2.47",
"@types/react-dom": "18.2.18",
"@types/react-syntax-highlighter": "^15.5.11",
"@types/validator": "^13.11.7",
"@types/validator": "^13.11.8",
"@vitejs/plugin-react": "^4.2.1",
"autoprefixer": "^10.4.16",
"daisyui": "^4.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ export default function PromptConfiguration({
<PromptConfigCodeSnippet
promptConfigId={promptConfigId}
isDefaultConfig={promptConfig.isDefault ?? false}
expectedVariables={promptConfig.expectedTemplateVariables}
/>
</>
)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ describe('PromptConfigCodeSnippet', () => {
<PromptConfigCodeSnippet
promptConfigId={promptConfigId}
isDefaultConfig={true}
expectedVariables={[]}
/>,
);
const defaultFrameworkTab = screen.getByTestId('tab-Android');
Expand All @@ -32,6 +33,7 @@ describe('PromptConfigCodeSnippet', () => {
<PromptConfigCodeSnippet
promptConfigId={promptConfigId}
isDefaultConfig={true}
expectedVariables={[]}
/>,
);
const snippet = screen.getByTestId(`code-snippet-${language}`);
Expand All @@ -47,6 +49,7 @@ describe('PromptConfigCodeSnippet', () => {
<PromptConfigCodeSnippet
promptConfigId={promptConfigId}
isDefaultConfig={false}
expectedVariables={[]}
/>,
);
const snippet = screen.getByTestId(`code-snippet-${language}`);
Expand All @@ -61,6 +64,7 @@ describe('PromptConfigCodeSnippet', () => {
<PromptConfigCodeSnippet
promptConfigId={promptConfigId}
isDefaultConfig={true}
expectedVariables={[]}
/>,
);
const copyButtonKotlin = screen.getByTestId(
Expand All @@ -83,6 +87,7 @@ describe('PromptConfigCodeSnippet', () => {
<PromptConfigCodeSnippet
promptConfigId={promptConfigId}
isDefaultConfig={true}
expectedVariables={[]}
/>,
);
const docsButton = screen.getByTestId(
Expand All @@ -98,6 +103,7 @@ describe('PromptConfigCodeSnippet', () => {
<PromptConfigCodeSnippet
promptConfigId={promptConfigId}
isDefaultConfig={true}
expectedVariables={[]}
/>,
);
const createAPIKeyButton = screen.getByTestId(
Expand All @@ -113,6 +119,7 @@ describe('PromptConfigCodeSnippet', () => {
<PromptConfigCodeSnippet
promptConfigId={promptConfigId}
isDefaultConfig={true}
expectedVariables={[]}
/>,
);
const iosTab = screen.getByTestId('tab-iOS');
Expand All @@ -128,6 +135,7 @@ describe('PromptConfigCodeSnippet', () => {
<PromptConfigCodeSnippet
promptConfigId={promptConfigId}
isDefaultConfig={true}
expectedVariables={[]}
/>,
);

Expand Down
Loading

0 comments on commit c42085d

Please sign in to comment.