Skip to content

Commit 7483bd2

Browse files
Copilothotlong
andcommitted
Changes before error encountered
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent e3b0d57 commit 7483bd2

22 files changed

+3935
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
out/
3+
*.vsix
4+
.vscode-test/
5+
*.log
6+
.DS_Store
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
out/
2+
node_modules/
3+
*.vsix
4+
.vscode-test/
5+
.DS_Store
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Changelog
2+
3+
All notable changes to the "ObjectQL" extension will be documented in this file.
4+
5+
## [0.1.0] - 2026-01-15
6+
7+
### Added
8+
- Initial release of ObjectQL VSCode extension
9+
- JSON Schema validation for `.object.yml`, `.app.yml` files
10+
- Language support for ObjectQL metadata files
11+
- Comprehensive snippets library:
12+
- Object definition snippets
13+
- Field type snippets (text, number, select, lookup, datetime, etc.)
14+
- Validation rule snippets
15+
- Index and AI search configuration snippets
16+
- TypeScript hook snippets (beforeCreate, afterCreate, etc.)
17+
- TypeScript action snippets (record, global)
18+
- Repository operation snippets (query, create, update)
19+
- Quick commands:
20+
- New Object Definition
21+
- New Validation Rules
22+
- New Permission Rules
23+
- New Application Config
24+
- Validate Current File
25+
- File type recognition with custom icons
26+
- Integration with Red Hat YAML extension
27+
- Welcome message for first-time users
28+
- Configuration settings for validation, completion, and diagnostics
29+
30+
### Features
31+
- Auto-completion for ObjectQL files
32+
- Real-time schema validation
33+
- Context-aware IntelliSense
34+
- File templates with best practices
35+
- Hover documentation support
36+
- Problems panel integration
37+
38+
### Documentation
39+
- Comprehensive README with examples
40+
- Snippet usage guide
41+
- Configuration reference
42+
- Getting started guide
43+
44+
[0.1.0]: https://github.com/objectstack-ai/objectql/releases/tag/vscode-v0.1.0
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Contributing to ObjectQL VSCode Extension
2+
3+
Thank you for your interest in contributing to the ObjectQL VSCode extension!
4+
5+
## Development Setup
6+
7+
1. Clone the repository:
8+
```bash
9+
git clone https://github.com/objectstack-ai/objectql.git
10+
cd objectql/packages/tools/vscode-objectql
11+
```
12+
13+
2. Install dependencies:
14+
```bash
15+
npm install
16+
```
17+
18+
3. Open in VS Code:
19+
```bash
20+
code .
21+
```
22+
23+
4. Press `F5` to launch the extension in debug mode
24+
25+
## Making Changes
26+
27+
### Adding New Snippets
28+
29+
Edit the snippet files in `snippets/`:
30+
- `snippets/objectql.json` - YAML snippets for object definitions
31+
- `snippets/hooks-actions.json` - TypeScript snippets for hooks and actions
32+
33+
### Updating Schemas
34+
35+
JSON schemas are copied from `packages/foundation/types/schemas/`. To update:
36+
37+
1. Make changes in the source schemas
38+
2. Run the copy script or manually copy updated schemas
39+
40+
### Adding New Commands
41+
42+
1. Add command definition in `package.json` under `contributes.commands`
43+
2. Register command handler in `src/extension.ts`
44+
3. Implement command logic
45+
46+
### Testing
47+
48+
1. Press `F5` to launch Extension Development Host
49+
2. Test your changes in the new window
50+
3. Check for errors in the Debug Console
51+
52+
## Code Style
53+
54+
- Use TypeScript strict mode
55+
- Follow existing code patterns
56+
- Add comments for complex logic
57+
- Use English for all code and comments
58+
59+
## Submitting Changes
60+
61+
1. Create a feature branch
62+
2. Make your changes
63+
3. Test thoroughly
64+
4. Submit a pull request with clear description
65+
66+
## Questions?
67+
68+
Open an issue in the main repository for questions or discussions.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Installation Guide
2+
3+
This guide shows how to build and install the ObjectQL VSCode extension.
4+
5+
## Prerequisites
6+
7+
- Node.js 16+ and npm
8+
- Visual Studio Code 1.85.0 or higher
9+
- (Optional) Red Hat YAML extension for enhanced YAML support
10+
11+
## Build from Source
12+
13+
1. **Navigate to the extension directory:**
14+
```bash
15+
cd packages/tools/vscode-objectql
16+
```
17+
18+
2. **Install dependencies:**
19+
```bash
20+
npm install
21+
```
22+
23+
3. **Compile TypeScript:**
24+
```bash
25+
npm run compile
26+
```
27+
28+
4. **Package the extension:**
29+
```bash
30+
npm run package
31+
```
32+
33+
This creates a `.vsix` file (e.g., `vscode-objectql-0.1.0.vsix`).
34+
35+
## Install the Extension
36+
37+
### Method 1: Install from VSIX (Recommended)
38+
39+
1. Open Visual Studio Code
40+
2. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on macOS)
41+
3. Type "Extensions: Install from VSIX..."
42+
4. Select the `vscode-objectql-0.1.0.vsix` file
43+
5. Reload VS Code when prompted
44+
45+
### Method 2: Install via Command Line
46+
47+
```bash
48+
code --install-extension vscode-objectql-0.1.0.vsix
49+
```
50+
51+
### Method 3: Development Mode
52+
53+
For testing during development:
54+
55+
1. Open the extension folder in VS Code:
56+
```bash
57+
code packages/tools/vscode-objectql
58+
```
59+
60+
2. Press `F5` to launch Extension Development Host
61+
3. The extension runs in a new VS Code window for testing
62+
63+
## Verify Installation
64+
65+
1. Open Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
66+
2. Type "ObjectQL" - you should see commands like:
67+
- ObjectQL: New Object Definition
68+
- ObjectQL: New Validation Rules
69+
- etc.
70+
71+
3. Create a new file with `.object.yml` extension
72+
4. Start typing `oql-` to see snippets
73+
74+
## Uninstall
75+
76+
1. Open Extensions panel (`Ctrl+Shift+X` / `Cmd+Shift+X`)
77+
2. Search for "ObjectQL"
78+
3. Click "Uninstall"
79+
80+
## Troubleshooting
81+
82+
### Extension not activating
83+
84+
- Check that you have a workspace folder open
85+
- Verify the extension is enabled in Extensions panel
86+
- Reload VS Code: `Developer: Reload Window`
87+
88+
### Snippets not appearing
89+
90+
- Ensure you're in a YAML file
91+
- Check that completion is enabled: `objectql.completion.enabled`
92+
- Try reloading VS Code
93+
94+
### Schema validation not working
95+
96+
- Install Red Hat YAML extension: `redhat.vscode-yaml`
97+
- Check settings: `objectql.validation.enabled` should be `true`
98+
- Verify file pattern matches (e.g., `*.object.yml`)
99+
100+
### Build errors
101+
102+
- Ensure Node.js 16+ is installed
103+
- Clear node_modules and reinstall:
104+
```bash
105+
rm -rf node_modules package-lock.json
106+
npm install
107+
```
108+
109+
## Next Steps
110+
111+
- Read the [README](README.md) for usage examples
112+
- Check [CONTRIBUTING](CONTRIBUTING.md) for development guidelines
113+
- Visit [ObjectQL Documentation](https://github.com/objectstack-ai/objectql) for protocol details

0 commit comments

Comments
 (0)