-
Notifications
You must be signed in to change notification settings - Fork 254
Address several user experience issues #19
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
Conversation
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.
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 |
Copilot
AI
Jun 19, 2025
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 implementation of the 'storyteller' function appears incomplete. Consider providing a proper return value or implementation to prevent unexpected runtime behavior.
| return | |
| return {{storyteller.replace(/^/gm, ' ').trimStart()}}; |
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.