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

feat: Add evaluation result to the prompt's context after each step #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
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
Loading