microsoft / genaiscript

Generative AI Scripting
https://microsoft.github.io/genaiscript/
MIT License
81 stars 22 forks source link

better generate automation help #518

Closed pelikhan closed 4 weeks ago

pelikhan commented 4 weeks ago

Correctly specify glob in file location

CLI Changes

Library Changes

generated by genaiscript pr-describe

github-actions[bot] commented 4 weeks ago

Concerns:

  1. The change in the traceCliArgs function replaces a detailed YAML configuration example with a link to the CLI test command. This might reduce the clarity for users who prefer seeing configuration examples directly in the output. ๐Ÿค”

  2. The generateCliArguments function now uses relativePath from host.projectFolder() to generate the CLI spec argument. This assumes that host.projectFolder() will always return a valid project folder path, which might not be the case if the project folder is not properly defined or if the function is called in a context where the project folder is not relevant. ๐Ÿ› ๏ธ

  3. In the ExtensionState class, the cliInfo.spec property is being set with a conditional expression that checks if the filename ends with dir.gpspec.md and replaces it with **. This logic seems specific and might not be clear why this replacement is necessary. It could potentially lead to unexpected behavior if the filename convention changes or if there are other .gpspec.md files that do not follow this pattern. ๐Ÿง

Suggested code improvement:

// Explain the specific case for 'dir.gpspec.md' files here
spec:
    this.host.isVirtualFile(fragment.file.filename) &&
    this.host.path.basename(fragment.file.filename) ===
        "dir.gpspec.md"
        ? fragment.file.filename.replace(
              /dir\.gpspec\.md$/i,
              "**"
          )
        : // ... rest of the code

Given these concerns, I would suggest addressing them before approving the changes. ๐Ÿšง

generated by genaiscript pr-review