You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: rename StreamHider to StreamGuard and update related configurations
- Updated extension name and display name from StreamHider to StreamGuard.
- Changed configuration keys from streamHider.* to StreamGuard.* in settings and code.
- Adjusted README, CHANGELOG, and package files to reflect the new extension name and versioning.
- Modified comment parsing logic to use redaction terminology instead of hiding.
- Updated tests to ensure functionality aligns with new naming conventions.
Signed-off-by: Wiibleyde <nathan@bonnell.fr>
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
-
# Copilot Instructions — StreamHider
1
+
# Copilot Instructions — StreamGuard
2
2
3
3
## Project Overview
4
4
5
-
StreamHider is a **VS Code extension** that visually hides sensitive code during live streams using the `TextEditorDecorationType` API. It never modifies source files — all hiding is purely decorative.
5
+
StreamGuard is a **VS Code extension** that visually hides sensitive code during live streams using the `TextEditorDecorationType` API. It never modifies source files — all hiding is purely decorative.
6
6
7
7
## Architecture
8
8
9
9
The extension follows a layered architecture rooted in `src/`:
10
10
11
11
-**Entry point**: [src/extension.ts](src/extension.ts) — `activate()` wires up the status bar, commands, config watchers, and document-change listeners; `deactivate()` disposes resources.
12
12
-**Orchestrator**: [src/hide/hide-manager.ts](src/hide/hide-manager.ts) — `refreshEditor()` is the core pipeline: read config → check file/folder glob patterns → parse comment annotations → apply decorations. All visible editors are refreshed on config change, document edit, or editor visibility change.
-**Decoration provider**: [src/hide/decoration-provider.ts](src/hide/decoration-provider.ts) — manages `TextEditorDecorationType` instances keyed by replacement text. Uses `letterSpacing: "-1000em"` + transparent color to visually collapse text, with a `before` pseudo-element showing the placeholder.
15
15
-**Pattern matcher**: [src/hide/pattern-matcher.ts](src/hide/pattern-matcher.ts) — minimal glob-to-regex converter (no external deps). Normalizes backslashes and tests both full path and basename.
16
-
-**Language config**: [src/languages/language-config.ts](src/languages/language-config.ts) — built-in comment-syntax registry for 20+ languages. Users can override via `streamHider.languageCommentPrefixes`. Unknown languages fall back to `["//", "#", "--"]`.
16
+
-**Language config**: [src/languages/language-config.ts](src/languages/language-config.ts) — built-in comment-syntax registry for 20+ languages. Users can override via `StreamGuard.languageCommentPrefixes`. Unknown languages fall back to `["//", "#", "--"]`.
17
17
-**Config**: [src/config/](src/config/) — `readConfig()` reads from VS Code workspace settings; `watchConfig()` listens for `onDidChangeConfiguration`.
|`StreamGuard.languageCommentPrefixes`|`object`|`{}`| Custom comment prefixes per language ID (e.g. `{ "lua": ["--"] }`) |
115
113
116
114
---
117
115
118
116
## Commands
119
117
120
118
| Command | Description |
121
119
|---|---|
122
-
|`StreamHider: Toggle Stream Mode`| Enables or disables stream redacting |
120
+
|`StreamGuard: Toggle Stream Mode`| Enables or disables stream redacting |
123
121
124
122
---
125
123
@@ -148,53 +146,8 @@ src/
148
146
│ ├── hide-manager.ts # Main orchestrator
149
147
│ └── pattern-matcher.ts # Glob pattern matching for files/folders
150
148
├── config/
151
-
│ ├── workspace-config.ts # Read streamHider config from workspace
149
+
│ ├── workspace-config.ts # Read StreamGuard config from workspace
152
150
│ └── config-watcher.ts # React to config changes
153
151
└── utils/
154
152
└── logger.ts # Internal logger using OutputChannel
155
153
```
156
-
157
-
---
158
-
159
-
## CI/CD
160
-
161
-
The repository uses **GitHub Actions** for continuous integration and automated releases.
162
-
163
-
### Continuous Integration (`ci.yml`)
164
-
165
-
Triggered on every **push** and **pull request** targeting `main`.
166
-
167
-
| Step | Command |
168
-
|---|---|
169
-
| Install dependencies |`npm ci`|
170
-
| Lint |`npm run lint`|
171
-
| Compile |`npm run compile`|
172
-
| Unit tests |`npm test`|
173
-
174
-
### Release (`release.yml`)
175
-
176
-
Triggered automatically when a tag matching `v*.*.*` is pushed.
177
-
178
-
```bash
179
-
# Create and push a new version tag to trigger a release
180
-
git tag v1.0.0
181
-
git push origin v1.0.0
182
-
```
183
-
184
-
| Step | Description |
185
-
|---|---|
186
-
| Lint + Compile + Test | Same checks as CI |
187
-
|`vsce package`| Produces a `.vsix` file |
188
-
| Upload artifact |`.vsix` is attached to the GitHub Actions run |
189
-
| Publish to Marketplace | Runs when the `VSCE_PAT` secret is configured |
190
-
| GitHub Release | Creates a release with the `.vsix` attached and auto-generated notes |
191
-
192
-
#### Required secret
193
-
194
-
To enable automatic publishing to the Visual Studio Marketplace, add the following secret in **Settings → Secrets and variables → Actions**:
195
-
196
-
| Secret name | Value |
197
-
|---|---|
198
-
|`VSCE_PAT`| Your [Personal Access Token](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#get-a-personal-access-token) from Azure DevOps |
199
-
200
-
> If `VSCE_PAT` is not set, the workflow still runs, packages the `.vsix`, and creates a GitHub Release — the Marketplace publish step is simply skipped.
"description": "Enable or disable StreamHider globally"
40
+
"description": "Enable or disable StreamGuard globally"
49
41
},
50
-
"streamHider.hiddenFilePatterns": {
42
+
"streamGuard.redactedFilePatterns": {
51
43
"type": "array",
52
44
"items": {
53
45
"type": "string"
54
46
},
55
47
"default": [],
56
-
"description": "Glob patterns of files whose content should be hidden"
48
+
"description": "Glob patterns of files whose content should be redacted"
57
49
},
58
-
"streamHider.hiddenFolders": {
50
+
"streamGuard.redactedFolders": {
59
51
"type": "array",
60
52
"items": {
61
53
"type": "string"
62
54
},
63
55
"default": [],
64
-
"description": "Folder glob patterns to hide in explorer and editor"
56
+
"description": "Folder glob patterns to redact in explorer and editor"
65
57
},
66
-
"streamHider.languageCommentPrefixes": {
58
+
"streamGuard.languageCommentPrefixes": {
67
59
"type": "object",
68
60
"default": {},
69
61
"description": "Custom comment prefixes per language ID. Maps a VSCode language ID to an array of single-line comment prefixes. Example: { \"lua\": [\"--\"], \"python\": [\"#\"] }",
0 commit comments