-
Notifications
You must be signed in to change notification settings - Fork 126
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
Cli test list #647
Cli test list #647
Conversation
The pull request introduces several changes:
Overall, the changes look fine. However, since So, LGTM 🚀.
|
@@ -72,7 +72,7 @@ export async function cli() { | |||
program.on("option:quiet", () => setQuiet(true)) | |||
|
|||
program | |||
.command("run", { isDefault: true }) | |||
.command("run") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default command for the CLI has been removed. This could lead to unexpected behavior for users who rely on the default command.
generated by pr-review-commit
missing_default
export async function scriptTestList(options: {}) { | ||
const scripts = await listTests(options) | ||
console.log(scripts.map((s) => toStringList(s.id, s.filename)).join("\n")) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Direct use of console.log is found in the scriptTestList function. It's recommended to use a proper logging library or mechanism for better control over log levels and output formatting.
generated by pr-review-commit
console_log
@@ -669,13 +669,14 @@ ${trimNewlines(schemaText)} | |||
}, | |||
}) | |||
|
|||
if (fileOutputs.length > 0) { | |||
const fods = fileOutputs?.filter((f) => !!f.description) | |||
if (fods?.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional chaining is used on fileOutputs. If fileOutputs is undefined, it could lead to unexpected behavior. Please ensure fileOutputs is always defined or handle the case where it might be undefined.
generated by pr-review-commit
optional_chaining
list
is added to GenAIScript CLI, which lists available tests in the workspace. This is a user facing change.📝scriptTestList
has been implemented to display the listed tests' id and filename. 📄FileOutput
interface anddefFileOutput
function in "core/src/prompt_template.d.ts" and "core/src/prompt_type.ts" optional now. This is a user facing change as well. 🔄FileOutput
is available before displaying it. 💫git diff
and test list command for commit review. 🆕