Skip to content

Commit

Permalink
Merge pull request #36 from wix-incubator/add-result-to-previous-step
Browse files Browse the repository at this point in the history
feat: Add evaluation result to the prompt's context after each step
  • Loading branch information
asafkorem authored Jan 16, 2025
2 parents e1c3915 + 3dd27b8 commit 84b908b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/PromptCreator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ describe('PromptCreator', () => {
{
step: 'navigate to login screen',
code: 'await element(by.id("login")).tap();',
result: undefined
result: 'success'
},
{
step: 'enter username',
code: 'await element(by.id("username")).typeText("john_doe");',
result: undefined
result: 'john doe'
}
];

Expand Down
1 change: 1 addition & 0 deletions src/utils/PromptCreator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export class PromptCreator {
"```",
previousStep.code,
"```",
...(previousStep.result ? [`- Result: ${previousStep.result}`] : []),
""
]).flat(),
""
Expand Down
2 changes: 2 additions & 0 deletions src/utils/__snapshots__/PromptCreator.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -673,13 +673,15 @@ No snapshot image is attached for this intent.
\`\`\`
await element(by.id("login")).tap();
\`\`\`
- Result: success
#### Step 2
- Intent: "enter username"
- Generated code:
\`\`\`
await element(by.id("username")).typeText("john_doe");
\`\`\`
- Result: john doe
## Available Testing Framework API
Expand Down

0 comments on commit 84b908b

Please sign in to comment.