feat: replace Tone Analysis with Explain - simplifies highlighted text in plain language
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 49s
Some checks failed
CI — Test & Build / Test & Build (push) Failing after 49s
This commit is contained in:
@@ -199,7 +199,7 @@ export default defineContentScript({
|
||||
{ label: '↺ Rephrase', action: 'rephrase', color: '#89b4fa' },
|
||||
{ label: '↓ Shorten', action: 'shorten', color: '#fab387' },
|
||||
{ label: '↑ Expand', action: 'expand', color: '#cba6f7' },
|
||||
{ label: '🎭 Tone', action: 'tone', color: '#2dd4bf' },
|
||||
{ label: '💡 Explain', action: 'explain', color: '#2dd4bf' },
|
||||
];
|
||||
|
||||
actions.forEach(({ label, action, color }) => {
|
||||
@@ -618,10 +618,10 @@ export default defineContentScript({
|
||||
showModal(`❌ ${response.error}`, null, snapStart, snapEnd, snapElement, snapRange);
|
||||
} else {
|
||||
// Tone analysis is display-only — no Replace button (pass null for originalText)
|
||||
const isToneAction = action === 'tone';
|
||||
const isExplainAction = action === 'explain';
|
||||
showModal(
|
||||
response?.result ?? '(no result)',
|
||||
isToneAction ? null : textToProcess,
|
||||
isExplainAction ? null : textToProcess,
|
||||
snapStart, snapEnd, snapElement, snapRange,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user