Feature/add gh rep branch catalogs#19
Merged
Merged
Conversation
Add GitCatalogService and instantiate during activation. Introduce commands: - copilotCatalog.dev.scanGitRepository (clone, scan, select catalogs, update config) - copilotCatalog.dev.refreshGitRepositories (initial support) Persist remote metadata and discovered catalog directories. Validate Git availability and restrict to HTTPS for initial MVP. Bump extension version to 0.3.6. Motivation: enable discovering and selectively importing catalog folders from external Git repos to streamline catalog curation and reuse.
This commit introduces a significant terminology change across the extension, renaming "Hats" to "Presets". This change is intended to make the feature's purpose more intuitive and align with more common industry language for saved configurations or templates. Key changes include: - Renaming all instances of "hat" and "hats" to "preset" and "presets" in the UI, commands, and internal code. - Updating associated icons and file names (e.g., `hat-dark.svg` to `preset-dark.svg`). - Renaming the example catalog directory from `hats` to `presets`. - Adding `.clinerules/` to `.gitignore`.
- Updated terminology in the codebase, documentation, and UI to replace "Hats" with "Presets". - Enhanced Git Catalog features including branch enumeration, commit locking, and interactive refresh flow. - Added new service APIs for managing presets. - Updated README and CHANGELOG to reflect changes and new features. - Added integration tests for new preset functionality.
This change reorganizes the options tree for better usability by moving Git-related commands into a dedicated submenu. - Creates a new 'Git Repositories' submenu under the 'Catalog' section. - Moves 'Scan Git Repository', 'Refresh Git Repositories', and 'List Git Remotes' from the 'Developer' section into the new submenu. - Renames 'Refresh' to 'Refresh All Catalogs' for clarity.
Introduces the `PresetQuickPickItem` interface to provide strong typing for the preset selection UI. This removes the need for `any` type assertions when applying or deleting presets, improving type safety and code readability. Additionally, this change adds a validation step in the `GitCatalogService` to ensure that a `lockedCommit` in a remote catalog's configuration points to a valid commit object. This prevents errors if the `lockedCommit` references a tag that is not a commit or an invalid object.
The `verify-version-sync.js` script now errors and exits with a non-zero status code if a version mismatch is detected between `package.json` and `source.extension.vsixmanifest`. Previously, the script would automatically update the manifest, which could hide versioning issues in CI environments. The new behavior ensures that verification steps fail as expected. To retain the auto-fixing functionality, a `--fix` flag has been introduced. A corresponding `npm run fix:version` script has been added to `package.json` for convenience. Additionally, this commit includes: - Refactoring in `MockFileService` to use a more robust path comparison method. - Improved error handling in the integration test runner.
This commit introduces `dotenv` and `dotenv-cli` to streamline the process of publishing the extension to the VS Code Marketplace. New npm scripts, `publish:prerelease` and `publish:stable`, use `dotenv` to load a personal access token from a local `.env` file, simplifying the release workflow. To prevent accidental exposure of secrets, the `.env` file has been added to `.vscodeignore`. Additionally, other build and packaging scripts have been updated for consistency.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces Git-based catalog support for the ContextShare extension, allowing users to discover and manage AI resource catalogs from remote Git repositories. It also renames "Hats" to "Presets" throughout the codebase for better clarity.
Key changes:
- New Git catalog service with branch enumeration, commit locking, and interactive refresh capabilities
- Complete rename from "Hats" to "Presets" for resource bundling feature
- Enhanced test coverage with real file system integration tests
Reviewed Changes
Copilot reviewed 20 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/services/gitCatalogService.ts | New service for Git-based catalog discovery and management with branch tracking/locking |
| src/services/presetService.ts | Renamed from hatService.ts with updated terminology throughout |
| src/extension.ts | Added Git catalog commands and updated preset-related functionality |
| test/gitCatalog.integration.test.ts | Comprehensive test suite for Git catalog functionality |
| test/real.integration.test.ts | New integration tests using actual file system operations |
| src/utils/security.ts | Fixed regex patterns in path sanitization |
joninafta
disabled auto-merge
September 23, 2025 04:43
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.
No description provided.