@codewithdan/zingit 0.16.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +13 -13
- package/CHANGELOG.md +28 -0
- package/README.md +17 -17
- package/bin/cli.js +2 -2
- package/client/dist/zingit-client.js +46 -46
- package/package.json +6 -4
- package/server/dist/agents/base.d.ts +2 -2
- package/server/dist/agents/base.js +13 -13
- package/server/dist/agents/claude.js +1 -1
- package/server/dist/agents/codex.js +1 -1
- package/server/dist/agents/copilot.js +1 -1
- package/server/dist/handlers/messageHandlers.js +9 -9
- package/server/dist/services/git-manager.d.ts +5 -5
- package/server/dist/services/git-manager.js +10 -10
- package/server/dist/services/index.d.ts +1 -1
- package/server/dist/types.d.ts +2 -2
- package/server/dist/validation/payload.d.ts +1 -1
- package/server/dist/validation/payload.js +25 -25
package/AGENTS.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Project Overview
|
|
4
4
|
|
|
5
|
-
ZingIt is a browser-based
|
|
5
|
+
ZingIt is a browser-based marker tool that allows users to click on webpage elements and add notes/instructions. These markers are then sent to an AI agent (Claude Code, GitHub Copilot CLI, or OpenAI Codex) which can automatically implement the requested changes.
|
|
6
6
|
|
|
7
7
|
**Use case**: Point-and-click UI feedback that gets automatically implemented by AI.
|
|
8
8
|
|
|
9
9
|
**Key Features**:
|
|
10
|
-
- Visual element selection with
|
|
10
|
+
- Visual element selection with marking
|
|
11
11
|
- Multi-agent support (Claude, Copilot, Codex)
|
|
12
12
|
- Automatic screenshot capture
|
|
13
13
|
- Change history tracking
|
|
@@ -46,8 +46,8 @@ zingit/
|
|
|
46
46
|
│ │ │ ├── zing-ui.ts # Main orchestrator component
|
|
47
47
|
│ │ │ ├── toolbar.ts # Action buttons and status
|
|
48
48
|
│ │ │ ├── highlight.ts # Element hover highlight
|
|
49
|
-
│ │ │ ├── markers.ts # Numbered
|
|
50
|
-
│ │ │ ├── modal.ts #
|
|
49
|
+
│ │ │ ├── markers.ts # Numbered marker badges
|
|
50
|
+
│ │ │ ├── modal.ts # Marker input dialog
|
|
51
51
|
│ │ │ ├── settings.ts # Configuration panel
|
|
52
52
|
│ │ │ ├── response.ts # Agent response display
|
|
53
53
|
│ │ │ ├── toast.ts # Notification toasts
|
|
@@ -109,8 +109,8 @@ zingit/
|
|
|
109
109
|
|
|
110
110
|
## Key Concepts
|
|
111
111
|
|
|
112
|
-
###
|
|
113
|
-
|
|
112
|
+
### Markers
|
|
113
|
+
A marker captures:
|
|
114
114
|
- `selector` - CSS selector to locate the element
|
|
115
115
|
- `identifier` - Human-readable element description (e.g., "button.primary")
|
|
116
116
|
- `html` - Outer HTML of the element
|
|
@@ -127,7 +127,7 @@ The history component tracks all changes made by the AI agent:
|
|
|
127
127
|
- Accessible via the clock icon in the toolbar
|
|
128
128
|
|
|
129
129
|
### WebSocket Messages
|
|
130
|
-
- **Client → Server**: `batch` (send
|
|
130
|
+
- **Client → Server**: `batch` (send markers), `message` (follow-up), `reset` (clear session)
|
|
131
131
|
- **Server → Client**: `connected`, `processing`, `delta` (streaming), `tool_start`/`tool_end`, `idle`, `error`
|
|
132
132
|
|
|
133
133
|
### Agent System
|
|
@@ -174,19 +174,19 @@ npx cross-env PROJECT_DIR=/path/to/your/project npx @codewithdan/zingit
|
|
|
174
174
|
|
|
175
175
|
| Key | Action |
|
|
176
176
|
|-----|--------|
|
|
177
|
-
| `Z` | Toggle
|
|
178
|
-
| `Ctrl/Cmd+Z` | Undo last
|
|
177
|
+
| `Z` | Toggle marker mode on/off |
|
|
178
|
+
| `Ctrl/Cmd+Z` | Undo last marker |
|
|
179
179
|
| `?` | Show help overlay |
|
|
180
180
|
| `` ` `` | Toggle ZingIt visibility |
|
|
181
181
|
| `Esc` | Close current panel/modal |
|
|
182
|
-
| `Ctrl/Cmd+Enter` | Save
|
|
182
|
+
| `Ctrl/Cmd+Enter` | Save marker (in modal) |
|
|
183
183
|
|
|
184
184
|
## State Persistence
|
|
185
185
|
|
|
186
186
|
The client persists state to `localStorage`:
|
|
187
|
-
- `
|
|
187
|
+
- `zingit_markers` - Current page markers (URL-scoped)
|
|
188
188
|
- `zingit_settings` - User preferences (wsUrl, colors, projectDir)
|
|
189
|
-
- `zingit_active` -
|
|
189
|
+
- `zingit_active` - Marker mode on/off (persists across pages)
|
|
190
190
|
|
|
191
191
|
## Important Implementation Details
|
|
192
192
|
|
|
@@ -279,7 +279,7 @@ Additional test pages are available:
|
|
|
279
279
|
- `http://localhost:5200/about.html` - About page with stats/timeline
|
|
280
280
|
- `http://localhost:5200/contact.html` - Contact form and FAQ
|
|
281
281
|
|
|
282
|
-
Add `?zingit` to any URL to activate the
|
|
282
|
+
Add `?zingit` to any URL to activate the marker tool.
|
|
283
283
|
|
|
284
284
|
## Build Output
|
|
285
285
|
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
### [0.17.1](https://github.com/danwahlin/zingit/compare/v0.16.1...v0.17.1) (2026-01-29)
|
|
6
|
+
|
|
7
|
+
### [0.16.1](https://github.com/danwahlin/zingit/compare/v0.16.0...v0.16.1) (2026-01-29)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* integrate standard-version for versioning and changelog management ([69c9f4e](https://github.com/danwahlin/zingit/commit/69c9f4ee5a025d845c4ea6bfb9185c8cee306a2f))
|
|
13
|
+
|
|
14
|
+
## [0.16.0](https://github.com/danwahlin/zingit/compare/v0.15.0...v0.16.0) (2026-01-28)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **security**: Fix command injection vulnerability in git operations ([server/src/services/git-manager.ts](server/src/services/git-manager.ts))
|
|
19
|
+
* Replaced `execAsync` with `execFileAsync` using array arguments to prevent shell injection
|
|
20
|
+
* Affected commands: git diff, git reset --hard
|
|
21
|
+
* **security**: Fix XSS vulnerability in agent response rendering ([client/src/components/agent-response-panel.ts](client/src/components/agent-response-panel.ts))
|
|
22
|
+
* Implemented safe Lit templating instead of `.innerHTML`
|
|
23
|
+
* All user content is now automatically HTML-escaped by Lit's template system
|
|
24
|
+
* Markdown formatting (bold, italic, code) preserved while preventing script injection
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* Add 'prompts' keyword to package.json for improved discoverability
|
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# ZingIt
|
|
2
2
|
|
|
3
|
-
Streamline how you share UI changes with your AI assistant. Select elements,
|
|
3
|
+
Streamline how you share UI changes with your AI assistant. Select elements, mark them, and send directly to AI agents for automated fixes.
|
|
4
4
|
|
|
5
5
|
**[Try the Live Demo →](https://danwahlin.github.io/zingit)**
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
- **Visual
|
|
9
|
+
- **Visual Markers** - Click any element to describe changes you want
|
|
10
10
|
- **Multi-Agent Support** - Works with Claude Code, GitHub Copilot CLI, and OpenAI Codex
|
|
11
11
|
- **Real-time Streaming** - Watch the AI work in real-time
|
|
12
12
|
- **Smart Selectors** - Auto-generates CSS selectors for precise targeting
|
|
@@ -50,7 +50,7 @@ npm run dev
|
|
|
50
50
|
|
|
51
51
|
5. Visit [http://localhost:5200/?zingit](http://localhost:5200/?zingit) to see ZingIt in action!
|
|
52
52
|
|
|
53
|
-
6. You'll be prompted to select an AI agent. Start
|
|
53
|
+
6. You'll be prompted to select an AI agent. Start marking!
|
|
54
54
|
|
|
55
55
|
### Option 2: Add to Your Website
|
|
56
56
|
|
|
@@ -74,20 +74,20 @@ Example: `http://localhost:5200/?zingit`
|
|
|
74
74
|
|
|
75
75
|
## Usage
|
|
76
76
|
|
|
77
|
-
1. **Press `Z`** to toggle
|
|
78
|
-
2. **Click elements** on your page to
|
|
79
|
-
3. **Click the sparkle icon** (✨) in the toolbar to send
|
|
77
|
+
1. **Press `Z`** to toggle mark mode on/off
|
|
78
|
+
2. **Click elements** on your page to mark them - add notes about changes you want
|
|
79
|
+
3. **Click the sparkle icon** (✨) in the toolbar to send markers to your AI agent
|
|
80
80
|
4. **Watch the agent work** in real-time - the response panel shows streaming updates
|
|
81
81
|
|
|
82
82
|
### Toolbar Icons
|
|
83
83
|
|
|
84
84
|
| Icon | Description |
|
|
85
85
|
|------|-------------|
|
|
86
|
-
| **ON/OFF** | Toggle
|
|
87
|
-
| **✨** (Sparkle) | Send
|
|
86
|
+
| **ON/OFF** | Toggle mark mode |
|
|
87
|
+
| **✨** (Sparkle) | Send markers to AI agent |
|
|
88
88
|
| **🕒** (Clock) | View change history |
|
|
89
|
-
| **📋** (Copy) | Export
|
|
90
|
-
| **🧹** (Broom) | Clear all
|
|
89
|
+
| **📋** (Copy) | Export markers as Markdown |
|
|
90
|
+
| **🧹** (Broom) | Clear all markers |
|
|
91
91
|
| **?** | View keyboard shortcuts |
|
|
92
92
|
| **⚙️** (Gear) | Open settings |
|
|
93
93
|
| **✕** | Close ZingIt toolbar |
|
|
@@ -96,12 +96,12 @@ Example: `http://localhost:5200/?zingit`
|
|
|
96
96
|
|
|
97
97
|
| Key | Action |
|
|
98
98
|
|-----|--------|
|
|
99
|
-
| `Z` | Toggle
|
|
100
|
-
| `Ctrl/Cmd+Z` | Undo last
|
|
99
|
+
| `Z` | Toggle mark mode on/off |
|
|
100
|
+
| `Ctrl/Cmd+Z` | Undo last marker |
|
|
101
101
|
| `?` | Show help overlay |
|
|
102
102
|
| `` ` `` | Toggle ZingIt visibility |
|
|
103
103
|
| `Esc` | Close current panel/modal |
|
|
104
|
-
| `Ctrl/Cmd+Enter` | Save
|
|
104
|
+
| `Ctrl/Cmd+Enter` | Save marker (in modal) |
|
|
105
105
|
|
|
106
106
|
## Configuration
|
|
107
107
|
|
|
@@ -112,7 +112,7 @@ Click the **gear icon** for settings:
|
|
|
112
112
|
| WebSocket URL | `ws://localhost:3000` | Server connection |
|
|
113
113
|
| Project Directory | *(server default)* | Override project path |
|
|
114
114
|
| Highlight Color | `#fbbf24` | Element highlight color |
|
|
115
|
-
| Marker Color | `#3b82f6` |
|
|
115
|
+
| Marker Color | `#3b82f6` | Marker badge color |
|
|
116
116
|
|
|
117
117
|
## Architecture
|
|
118
118
|
|
|
@@ -137,9 +137,9 @@ zingit/
|
|
|
137
137
|
- Verify AI agent is installed and authenticated
|
|
138
138
|
- Check server logs for error messages
|
|
139
139
|
|
|
140
|
-
**
|
|
141
|
-
-
|
|
142
|
-
- Changing pages clears
|
|
140
|
+
**Markers not persisting**
|
|
141
|
+
- Markers are URL-specific and stored in localStorage
|
|
142
|
+
- Changing pages clears markers
|
|
143
143
|
|
|
144
144
|
**Changes not appearing on published site**
|
|
145
145
|
- If you see a "Remote" badge in the toolbar, you're editing a published site
|
package/bin/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ function printBanner() {
|
|
|
20
20
|
console.log('');
|
|
21
21
|
console.log(`${colors.cyan}╔═══════════════════════════════════════════════════════════════╗${colors.reset}`);
|
|
22
22
|
console.log(`${colors.cyan}║ ║${colors.reset}`);
|
|
23
|
-
console.log(`${colors.cyan}║${colors.reset} ${colors.bright}⚡ ZingIt${colors.reset} - AI-Powered UI
|
|
23
|
+
console.log(`${colors.cyan}║${colors.reset} ${colors.bright}⚡ ZingIt${colors.reset} - AI-Powered UI Marker Tool ${colors.cyan}║${colors.reset}`);
|
|
24
24
|
console.log(`${colors.cyan}║ ║${colors.reset}`);
|
|
25
25
|
console.log(`${colors.cyan}╚═══════════════════════════════════════════════════════════════╝${colors.reset}`);
|
|
26
26
|
console.log('');
|
|
@@ -38,7 +38,7 @@ function printInstructions(port = 3000) {
|
|
|
38
38
|
console.log(` ${colors.bright}2.${colors.reset} Or visit the demo page:`);
|
|
39
39
|
console.log(` ${colors.blue}http://localhost:${port}${colors.reset}`);
|
|
40
40
|
console.log('');
|
|
41
|
-
console.log(` ${colors.bright}3.${colors.reset} Press ${colors.bright}Z${colors.reset} to toggle
|
|
41
|
+
console.log(` ${colors.bright}3.${colors.reset} Press ${colors.bright}Z${colors.reset} to toggle marker mode`);
|
|
42
42
|
console.log('');
|
|
43
43
|
console.log(`${colors.yellow}💡 Tip:${colors.reset} Make sure you have an AI agent running (Claude Code, GitHub Copilot CLI, or OpenAI Codex)`);
|
|
44
44
|
console.log('');
|