Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses several user experience issues by improving file path resolution, adding asynchronous finalization in tests, and enhancing language model settings verification. Key changes include:
- Enhancements to file handling using an optional working directory (cwd) in the CLI and index functions.
- Addition of a finalizer in tests to support lingering async operations and improved language model settings checks in the VS Code command.
- New and updated examples in the examples folder, including one incomplete function in the 301_generate_poml.poml file.
Reviewed Changes
Copilot reviewed 21 out of 30 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/poml/tests/index.test.tsx | Added fs/path imports, afterAll finalizer, and dynamic test generation for examples compilation. |
| packages/poml/index.ts | Introduced cwd support for working directory resolution and updated file path handling. |
| packages/poml/cli.ts | Added a new cwd option in the CLI arguments. |
| packages/poml-vscode/command/testCommand.ts | Added language model settings verification with error reporting. |
| examples/* | Various updates including new assets, JSON/CSV data changes, and updated POML examples (one incomplete function noted). |
| README.md | Revised installation instructions and configuration guidance. |
| /* Write a entertaining story that is engaging, imaginative and captivating for the audience. */ | ||
| <span whiteSpace="trim"> | ||
| function storyteller() { | ||
| return |
There was a problem hiding this comment.
The implementation of the 'storyteller' function appears incomplete. Consider providing a proper return value or implementation to prevent unexpected runtime behavior.
Suggested change
| return | |
| return {{storyteller.replace(/^/gm, ' ').trimStart()}}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements to documentation, new example files demonstrating POML features, and updates to the codebase to improve usability and functionality. The most important changes include updates to the
README.mdfor better clarity, the addition of several POML examples showcasing diverse use cases, and improvements to the Visual Studio Code extension and CLI commands for better configuration handling.Documentation Updates:
README.md: Updated instructions for installing the Visual Studio Code extension and added details on configuring language model settings.examples/README.md: Added an overview of the POML example library, organized examples by difficulty, and provided guidelines for contributing.New POML Examples:
Beginner examples:
examples/101_explain_character.poml: Demonstrates structured prompting with roles, tasks, and multimedia inputs for educational purposes.examples/102_render_xml.poml: Provides a template for legacy system migration analysis using XML syntax.Intermediate examples:
examples/201_orders_qa.poml: Implements a chatbot agent for customer order queries, integrating data from CSV files.examples/202_arc_agi.poml: Tests reasoning capabilities of an LLM by mapping input grids to output grids using JSON data.Advanced examples:
examples/301_generate_poml.poml: Combines multiple POML files into JavaScript functions for modular prompt generation.Codebase Enhancements:
Visual Studio Code extension:
packages/poml-vscode/command/testCommand.ts: Added validation to ensure language model settings are configured before testing prompts, improving error handling.CLI improvements:
packages/poml/cli.ts: Added acwdoption to specify the working directory, enhancing flexibility for file-based operations.