@bastiangx/opencode-unmoji 0.1.0 → 0.3.0
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/README.md +24 -5
- package/dist/core/emoji-data-generated.d.ts.map +1 -1
- package/dist/core/emoji-data-generated.js +7645 -5370
- package/dist/core/emoji-data-generated.js.map +1 -1
- package/dist/core/emoji-data.d.ts +3 -0
- package/dist/core/emoji-data.d.ts.map +1 -1
- package/dist/core/emoji-data.js +46 -2
- package/dist/core/emoji-data.js.map +1 -1
- package/dist/core/processor.d.ts +12 -1
- package/dist/core/processor.d.ts.map +1 -1
- package/dist/core/processor.js +67 -12
- package/dist/core/processor.js.map +1 -1
- package/dist/data/emoji-data-gen.d.ts +6 -0
- package/dist/data/emoji-data-gen.d.ts.map +1 -0
- package/dist/data/emoji-data-gen.js +30638 -0
- package/dist/data/emoji-data-gen.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +135 -4
- package/dist/index.js.map +1 -1
- package/dist/plugin.bundled.js +7949 -5445
- package/dist/src/core/config.d.ts +22 -0
- package/dist/src/core/config.d.ts.map +1 -0
- package/dist/src/core/config.js +82 -0
- package/dist/src/core/config.js.map +1 -0
- package/dist/src/core/emoji-data.d.ts +11 -0
- package/dist/src/core/emoji-data.d.ts.map +1 -0
- package/dist/src/core/emoji-data.js +105 -0
- package/dist/src/core/emoji-data.js.map +1 -0
- package/dist/src/core/processor.d.ts +16 -0
- package/dist/src/core/processor.d.ts.map +1 -0
- package/dist/src/core/processor.js +115 -0
- package/dist/src/core/processor.js.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +153 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/types/config.d.ts +55 -0
- package/dist/src/types/config.d.ts.map +1 -0
- package/dist/src/types/config.js +36 -0
- package/dist/src/types/config.js.map +1 -0
- package/dist/src/types/errors.d.ts +59 -0
- package/dist/src/types/errors.d.ts.map +1 -0
- package/dist/src/types/errors.js +6 -0
- package/dist/src/types/errors.js.map +1 -0
- package/dist/src/utils/code-detector.d.ts +17 -0
- package/dist/src/utils/code-detector.d.ts.map +1 -0
- package/dist/src/utils/code-detector.js +288 -0
- package/dist/src/utils/code-detector.js.map +1 -0
- package/dist/src/utils/grapheme.d.ts +20 -0
- package/dist/src/utils/grapheme.d.ts.map +1 -0
- package/dist/src/utils/grapheme.js +82 -0
- package/dist/src/utils/grapheme.js.map +1 -0
- package/dist/streaming/hooks.d.ts +12 -0
- package/dist/streaming/hooks.d.ts.map +1 -0
- package/dist/streaming/hooks.js +8 -0
- package/dist/streaming/hooks.js.map +1 -0
- package/dist/streaming/sanitizer.d.ts +66 -0
- package/dist/streaming/sanitizer.d.ts.map +1 -0
- package/dist/streaming/sanitizer.js +118 -0
- package/dist/streaming/sanitizer.js.map +1 -0
- package/dist/streaming/state.d.ts +10 -0
- package/dist/streaming/state.d.ts.map +1 -0
- package/dist/streaming/state.js +33 -0
- package/dist/streaming/state.js.map +1 -0
- package/dist/types/config.d.ts +21 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js +14 -0
- package/dist/types/config.js.map +1 -1
- package/dist/utils/code-detector.d.ts.map +1 -1
- package/dist/utils/code-detector.js +46 -10
- package/dist/utils/code-detector.js.map +1 -1
- package/dist/utils/grapheme.d.ts.map +1 -1
- package/dist/utils/grapheme.js +20 -2
- package/dist/utils/grapheme.js.map +1 -1
- package/package.json +19 -6
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<a href="https://codeberg.org/bastiangx/opencode-unmoji">
|
|
3
|
-
<img src="https://github.com/user-attachments/assets/
|
|
3
|
+
<img height="600" src="https://github.com/user-attachments/assets/e1aaf6b4-a646-4708-8002-9dbac7236f95"/>
|
|
4
4
|
</a>
|
|
5
5
|
</div>
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
An [OpenCode](https://opencode.ai) plugin that strips and replace _all_ emojis from agent outputs.
|
|
12
12
|
|
|
13
|
-
<img src="https://github.com/user-attachments/assets/fe606d89-01b0-4da6-81b7-5014d6aff972"/>
|
|
13
|
+
<img height="600" src="https://github.com/user-attachments/assets/fe606d89-01b0-4da6-81b7-5014d6aff972"/>
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
16
16
|
|
|
@@ -35,7 +35,7 @@ UNMOJI automatically removes _all_ _standard_ unicode emojis and glyphs from you
|
|
|
35
35
|
|
|
36
36
|
Specially useful when you are using models like Claude which seem to _LOVE_ spamming emojis on summaries, README files and documentations.
|
|
37
37
|
|
|
38
|
-
- ~
|
|
38
|
+
- ~ 30,000 emojis covered.
|
|
39
39
|
|
|
40
40
|
> _Thinking_ tokens as output targets are not supported.
|
|
41
41
|
|
|
@@ -53,7 +53,11 @@ Create and add the `unmoji.json` file to your OpenCode [config path](https://ope
|
|
|
53
53
|
"preserveInlineCode": true,
|
|
54
54
|
"skipQuotes": false,
|
|
55
55
|
"replacementStyle": "github",
|
|
56
|
-
"replacementFormat": "[:name:]"
|
|
56
|
+
"replacementFormat": "[:name:]",
|
|
57
|
+
"processMarkdown": true,
|
|
58
|
+
"markdownExtensions": [".md"],
|
|
59
|
+
"showNotification": true,
|
|
60
|
+
"notificationStyle": "thread"
|
|
57
61
|
}
|
|
58
62
|
```
|
|
59
63
|
|
|
@@ -66,6 +70,10 @@ Create and add the `unmoji.json` file to your OpenCode [config path](https://ope
|
|
|
66
70
|
| `skipQuotes` | `false` | `true`, `false` | Do not process emojis inside quoted text blocks |
|
|
67
71
|
| `replacementStyle` | `github` | `github`, `slack`, `discord`, `cldr`, `iamcal`, `joypixels` | Shortcode style used when mode is `replace` |
|
|
68
72
|
| `replacementFormat` | `[:name:]` | `:name:`, `[:name:]`, `{name}` | Template format for shortcode outputs |
|
|
73
|
+
| `processMarkdown` | `true` | `true`, `false` | Process emojis in markdown files written by tools |
|
|
74
|
+
| `markdownExtensions` | `[".md"]` | `.md`, `.mdx`, `.mdc`, `.markdown` (array) | File extensions treated as markdown for tool hooks |
|
|
75
|
+
| `showNotification` | `true` | `true`, `false` | Show notification when emojis are processed |
|
|
76
|
+
| `notificationStyle` | `thread` | `thread`, `thread-verbose`, `toast` | Notification display style |
|
|
69
77
|
|
|
70
78
|
#### `replace` Examples
|
|
71
79
|
|
|
@@ -103,13 +111,24 @@ Deploy successful 🚀 Bug fixed 🐛
|
|
|
103
111
|
Deploy successful [:rocket:] Bug fixed [:bug:]
|
|
104
112
|
```
|
|
105
113
|
|
|
114
|
+
### Markdown file processing
|
|
115
|
+
|
|
116
|
+
In addition to stripping/replacing emojis from agent text outputs, UNMOJI can also process markdown content that the agent writes to disk.
|
|
117
|
+
|
|
118
|
+
When `processMarkdown` is `true` (default):
|
|
119
|
+
|
|
120
|
+
- The `write` tool's `content` is processed for files whose `filePath` ends with one of `markdownExtensions`.
|
|
121
|
+
- The `edit` tool's `newString` is processed for matching markdown paths.
|
|
122
|
+
|
|
123
|
+
This ensures generated README.md, documentation, and other markdown files are kept emoji-free (or use text shortcodes) without affecting non-markdown files.
|
|
124
|
+
|
|
106
125
|
---
|
|
107
126
|
|
|
108
127
|
## Contributing
|
|
109
128
|
|
|
110
129
|
Contributions are welcome!
|
|
111
130
|
|
|
112
|
-
Follow the [Contributing guide](
|
|
131
|
+
Follow the [Contributing guide](./CONTRIBUTING.md) for instructions.
|
|
113
132
|
|
|
114
133
|
---
|
|
115
134
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emoji-data-generated.d.ts","sourceRoot":"","sources":["../../src/core/emoji-data-generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"emoji-data-generated.d.ts","sourceRoot":"","sources":["../../src/core/emoji-data-generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,aA8+LpB,CAAC;AAEH,eAAO,MAAM,cAAc,qBA8+LzB,CAAC;AAEH,eAAO,MAAM,gBAAgB,qBA8+L3B,CAAC;AAEH,eAAO,MAAM,gBAAgB,qBA8+L3B,CAAC;AAEH,eAAO,MAAM,mBAAmB,qBA8+L9B,CAAC"}
|