Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
- Keep inactive-view insertion results separate from unrelated current-working-copy conflict paths; retain genuine target conflict failures.
- Refresh the native descriptor fingerprint after integrating Atomic dev's vault-evidence replay contract, retaining strict runtime compatibility checks.
- Regenerate the vendored nodeatomic codecs, declarations, and descriptor fingerprint from published Atomic v0.22.0; document the exact compatible runtime and retain strict rejection of mismatched contracts.
- Upgrade vulnerable production dependencies (markdown-it, mermaid, sanitize-html, katex, Puppeteer, cspell, highlight.js, Shiki) and remove unused gRPC packages; `npm audit --omit=dev` is clean.
- Upgrade vulnerable production dependencies (markdown-it, mermaid, sanitize-html, katex, Puppeteer, highlight.js, Shiki) and remove unused gRPC packages; `npm audit --omit=dev` is clean.
- Load Puppeteer 25 as an ESM runtime and make webview/graph build steps cross-platform.
- Add CI for typecheck, tests, build, universal VSIX packaging, and production audit; set the public `atomicdotdev` publisher metadata and 1.0.0 version.
- Fix release preparation on the `release` branch, synchronize and commit lockfile versions, and accept dated changelog headings without requiring a horizontal-rule separator.
- Use an empty regular Git configuration file for release regression fixtures instead of an OS null-device path, which Git for Windows rejects.
- Remove the built-in spellchecker, bundled cspell dependencies, spelling toolbar/setting, and background checks; retain external diagnostics and replacement quick fixes from optional extensions such as Code Spell Checker.

## 0.2.12
- Package one universal, JavaScript-only VSIX; Atomic's platform library is supplied by the separate Atomic installation on the extension host.
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ Recognized intents require YAML `entry_type: intent`. Metadata that is managed b

Status suggestions are editing conveniences, not a schema. Setting a criterion to `met` does not manufacture evidence or establish conformance. The validation/attestation panel explicitly says **not checked**: no signature or SHACL result is inferred from author fields or hashes.

## Optional spellchecking

Sherpa does not bundle a spellchecker. For spelling diagnostics and replacement suggestions, optionally install [Code Spell Checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker) in VS Code. No separate cspell CLI installation is needed. Sherpa displays diagnostics and supported replacement quick fixes supplied by installed extensions in its ticket/source editor.

Configure spelling through the external extension; Sherpa has no spelling setting or toolbar toggle. Editing, saving, and Atomic features do not require a spelling extension.

## Atomic version control

Open a **trusted, local filesystem** workspace in an Atomic repository, then open **Source Control**:
Expand Down
810 changes: 2 additions & 808 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,6 @@
"order": 4,
"description": "Show line numbers."
},
"sherpaIntent.spellCheck.enabled": {
"type": "boolean",
"default": true,
"order": 6,
"description": "Show built-in spelling diagnostics in Atomic Sherpa when no external spell checker diagnostics are available."
},
"sherpaIntent.vimMode.enabled": {
"type": "boolean",
"default": false,
Expand Down Expand Up @@ -971,7 +965,6 @@
"@lezer/highlight": "^1.2.5",
"@replit/codemirror-vim": "^6.4.0",
"@types/vscode": "^1.109.0",
"cspell-lib": "^10.4.0",
"d3-drag": "3.0.0",
"d3-force": "3.0.0",
"d3-selection": "3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/preview.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const init = {
type: 'init', text, version: 1, diagnostics: [], theme: defaultThemeSettings,
mode: 'live', outlinePosition: 'right', outlineVisible: false,
lineNumbers: false, readOnly: false, gitChangesGutter: false,
gitDiffLineHighlights: false, spellCheckEnabled: false,
gitDiffLineHighlights: false,
contentMaxWidthEnabled: true, vimMode: false, vimKeybindings: [], vimLeader: '\\',
keymap: [], findOptions: { wholeWord: false, caseSensitive: false }
};
Expand Down
18 changes: 1 addition & 17 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import {
VIM_MODE_SETTING_KEY,
CODE_BLOCKS_VSCODE_THEME_SETTING_KEY,
CONTENT_MAX_WIDTH_SETTING_KEY,
SPELL_CHECK_SETTING_KEY,
READ_ONLY_SETTING_KEY,
getReadOnlyEnabled,
setReadOnlyEnabled,
Expand All @@ -48,7 +47,6 @@ import {
getOutlinePosition,
getOutlineVisible,
getContentMaxWidthEnabled,
getSpellCheckEnabled,
getThemeSettings,
getVimKeybindings,
getVimLeaderKey,
Expand Down Expand Up @@ -516,7 +514,6 @@ class MarkdownWebviewProvider implements vscode.CustomEditorProvider<MarkdownCus
private readonly activePanels = new Set<vscode.WebviewPanel>();
private readonly panelSessions = new Map<vscode.WebviewPanel, PanelSession>();
private readonly customDocuments = new Map<string, MarkdownCustomDocument>();
private readonly spellDiagnosticCollection = vscode.languages.createDiagnosticCollection('meo-spell');
private readonly customDocumentChangeEmitter = new vscode.EventEmitter<
vscode.CustomDocumentContentChangeEvent<MarkdownCustomDocument>
>();
Expand All @@ -527,7 +524,7 @@ class MarkdownWebviewProvider implements vscode.CustomEditorProvider<MarkdownCus
private readonly context: vscode.ExtensionContext,
private readonly agentReviewHandoff: AgentReviewHandoffController
) {
this.context.subscriptions.push(this.spellDiagnosticCollection, this.customDocumentChangeEmitter);
this.context.subscriptions.push(this.customDocumentChangeEmitter);
this.context.subscriptions.push(
vscode.workspace.onDidChangeTextDocument((event) => {
if (event.contentChanges.length === 0) {
Expand Down Expand Up @@ -716,18 +713,6 @@ class MarkdownWebviewProvider implements vscode.CustomEditorProvider<MarkdownCus
this.broadcast({ type: 'themeChanged', theme: getThemeSettings(), codeTheme: getCodeBlockVscodeTheme() });
}

if (
event.affectsConfiguration(`${EXTENSION_CONFIG_SECTION}.${SPELL_CHECK_SETTING_KEY}`) ||
event.affectsConfiguration('cSpell')
) {
if (event.affectsConfiguration(`${EXTENSION_CONFIG_SECTION}.${SPELL_CHECK_SETTING_KEY}`)) {
this.broadcast({ type: 'spellCheckChanged', enabled: getSpellCheckEnabled() });
}
for (const session of this.panelSessions.values()) {
session.refreshSpellDiagnostics();
}
}

if (event.affectsConfiguration(`${EXTENSION_CONFIG_SECTION}.${CODE_BLOCKS_VSCODE_THEME_SETTING_KEY}`)) {
this.broadcast({
type: 'shikiCodeBlocksChanged',
Expand Down Expand Up @@ -787,7 +772,6 @@ class MarkdownWebviewProvider implements vscode.CustomEditorProvider<MarkdownCus
document,
documentUri,
context: this.context,
spellDiagnosticCollection: this.spellDiagnosticCollection,
agentReviewHandoff: this.agentReviewHandoff,
onExportDocument: (session, format) => this.exportSessionDocument(session, format),
getFindOptions: () => this.getFindOptions(),
Expand Down
100 changes: 1 addition & 99 deletions src/extension/panelSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ import {
EXTENSION_CONFIG_SECTION,
LINE_NUMBERS_SETTING_KEY,
CONTENT_MAX_WIDTH_SETTING_KEY,
SPELL_CHECK_SETTING_KEY,
getReadOnlyEnabled,
setReadOnlyEnabled,
getContentMaxWidthEnabled,
getLineNumbersEnabled,
getSpellCheckEnabled,
getOutlinePosition,
getOutlineVisible,
getRememberPositionLines,
Expand All @@ -33,12 +31,6 @@ import type { ThemeSettings } from '../shared/themeDefaults';
import type { RawVscodeTheme } from '../shared/vscodeTheme';
import type { OutlinePosition } from '../shared/extensionConfig';
import { cspellReplacementEdit } from '../spell/cspellCodeActions';
import {
collectMeoSpellDiagnostics,
collectMeoSpellSuggestions,
hasExternalSpellDiagnostics,
MEO_SPELL_DIAGNOSTIC_SOURCE
} from '../spell/spellDiagnostics';

export type EditorMode = 'live' | 'source';
export type ExportFormat = 'html' | 'pdf';
Expand All @@ -56,7 +48,6 @@ type InitMessage = {
mode: EditorMode;
lineNumbers: boolean;
readOnly: boolean;
spellCheckEnabled: boolean;
contentMaxWidthEnabled: boolean;
vimMode: boolean;
vimKeybindings: VimKeybinding[];
Expand Down Expand Up @@ -176,11 +167,6 @@ type SetLineNumbersMessage = {
enabled?: boolean;
};

type SetSpellCheckMessage = {
type: 'setSpellCheck';
enabled: boolean;
};

type SetOutlineVisibleMessage = {
type: 'setOutlineVisible';
visible: boolean;
Expand Down Expand Up @@ -284,7 +270,6 @@ type WebviewMessage =
| DraftChangedMessage
| SetModeMessage
| SetLineNumbersMessage
| SetSpellCheckMessage
| SetOutlineVisibleMessage
| SetContentMaxWidthMessage
| SetReadOnlyMessage
Expand Down Expand Up @@ -326,7 +311,6 @@ type PanelSessionControllerParams = {
document: MarkdownCustomDocument;
documentUri: vscode.Uri;
context: vscode.ExtensionContext;
spellDiagnosticCollection: vscode.DiagnosticCollection;
agentReviewHandoff: AgentReviewHandoffController;
onExportDocument: (session: PanelSession, format: ExportFormat) => Promise<void>;
getFindOptions: () => FindOptions;
Expand All @@ -346,7 +330,6 @@ export type PanelSession = {
prepareSave: () => Promise<boolean>;
requestExportSnapshot: () => Promise<{ text: string; environment?: ExportStyleEnvironment }>;
rejectPendingExportSnapshots: (reason: Error) => void;
refreshSpellDiagnostics: () => void;
};

export type PanelSessionController = {
Expand All @@ -361,7 +344,6 @@ export function createPanelSessionController(params: PanelSessionControllerParam
document,
documentUri,
context,
spellDiagnosticCollection,
agentReviewHandoff,
onExportDocument,
getFindOptions,
Expand Down Expand Up @@ -389,8 +371,6 @@ export function createPanelSessionController(params: PanelSessionControllerParam
let lastSavedRememberedLine: number | null = null;
let lastSavedRememberedLineOffset = 0;
let disposed = false;
let spellCheckGeneration = 0;
let pendingSpellCheckTimer: ReturnType<typeof setTimeout> | null = null;
const workspaceRoot = vscode.workspace.getWorkspaceFolder(document.uri)?.uri.fsPath;
const pendingExportSnapshots = new Map<string, PendingExportSnapshot>();

Expand Down Expand Up @@ -525,7 +505,6 @@ export function createPanelSessionController(params: PanelSessionControllerParam
mode,
lineNumbers: getLineNumbersEnabled(context),
readOnly: getReadOnlyEnabled(),
spellCheckEnabled: getSpellCheckEnabled(),
contentMaxWidthEnabled: getContentMaxWidthEnabled(context),
vimMode: getVimModeEnabled(context),
vimKeybindings: getVimKeybindings(),
Expand All @@ -551,36 +530,6 @@ export function createPanelSessionController(params: PanelSessionControllerParam
return postToWebview(message);
};

const runSpellCheck = async (generation: number): Promise<void> => {
try {
const diagnostics = document.textDocument
? await collectMeoSpellDiagnostics(document.textDocument)
: [];
if (disposed || generation !== spellCheckGeneration) {
return;
}
spellDiagnosticCollection.set(document.uri, diagnostics);
} catch (error) {
if (!disposed) {
console.error('[MEO panelSession] spellCheck', error);
}
spellDiagnosticCollection.delete(document.uri);
}
};

const scheduleSpellCheck = (delayMs = 350): void => {
spellCheckGeneration += 1;
const generation = spellCheckGeneration;
if (pendingSpellCheckTimer !== null) {
clearTimeout(pendingSpellCheckTimer);
pendingSpellCheckTimer = null;
}
pendingSpellCheckTimer = setTimeout(() => {
pendingSpellCheckTimer = null;
runBackground(runSpellCheck(generation), 'spellCheck');
}, delayMs);
};

const sendDocChanged = async (): Promise<boolean> => {
const message: DocChangedMessage = {
type: 'docChanged',
Expand Down Expand Up @@ -864,8 +813,7 @@ export function createPanelSessionController(params: PanelSessionControllerParam
ensureInitDelivered,
prepareSave,
requestExportSnapshot,
rejectPendingExportSnapshots,
refreshSpellDiagnostics: () => scheduleSpellCheck(0),
rejectPendingExportSnapshots
};

const handleMessage = async (raw: WebviewMessage): Promise<void> => {
Expand All @@ -877,7 +825,6 @@ export function createPanelSessionController(params: PanelSessionControllerParam
webviewReady = true;
await ensureInitDelivered();
await flushPendingRevealSelection();
scheduleSpellCheck(0);
return;
case 'setMode':
mode = raw.mode;
Expand All @@ -892,11 +839,6 @@ export function createPanelSessionController(params: PanelSessionControllerParam
.update(LINE_NUMBERS_SETTING_KEY, visible, vscode.ConfigurationTarget.Global);
return;
}
case 'setSpellCheck':
await vscode.workspace
.getConfiguration(EXTENSION_CONFIG_SECTION)
.update(SPELL_CHECK_SETTING_KEY, raw.enabled === true, vscode.ConfigurationTarget.Global);
return;
case 'setOutlineVisible':
await setOutlineVisible(raw.visible);
return;
Expand Down Expand Up @@ -1046,8 +988,6 @@ export function createPanelSessionController(params: PanelSessionControllerParam
return;
}

scheduleSpellCheck();

if (isApplyingOwnChange) {
return;
}
Expand All @@ -1066,7 +1006,6 @@ export function createPanelSessionController(params: PanelSessionControllerParam
if (document.isSynchronized) {
return;
}
scheduleSpellCheck();
if (isApplyingOwnChange && kind === 'edit') {
return;
}
Expand All @@ -1075,24 +1014,10 @@ export function createPanelSessionController(params: PanelSessionControllerParam
}), 'sendDocChanged');
});

const documentSaveSubscription = vscode.workspace.onDidSaveTextDocument((savedDocument) => {
if (savedDocument.uri.toString() !== documentKey) {
return;
}
});

const diagnosticsSubscription = vscode.languages.onDidChangeDiagnostics((event) => {
if (!event.uris.some((uri) => uri.toString() === documentKey)) {
return;
}
if (document.textDocument && hasExternalSpellDiagnostics(document.textDocument)) {
spellCheckGeneration += 1;
if (pendingSpellCheckTimer !== null) {
clearTimeout(pendingSpellCheckTimer);
pendingSpellCheckTimer = null;
}
spellDiagnosticCollection.delete(document.uri);
}
runBackground(sendDiagnosticsChanged(), 'sendDiagnosticsChanged');
});

Expand Down Expand Up @@ -1135,12 +1060,6 @@ export function createPanelSessionController(params: PanelSessionControllerParam
return;
}
disposed = true;
spellCheckGeneration += 1;
if (pendingSpellCheckTimer !== null) {
clearTimeout(pendingSpellCheckTimer);
pendingSpellCheckTimer = null;
}
spellDiagnosticCollection.delete(document.uri);

runBackground(enqueue(async () => {
try {
Expand All @@ -1155,7 +1074,6 @@ export function createPanelSessionController(params: PanelSessionControllerParam
messageSubscription.dispose();
documentChangeSubscription.dispose();
localChangeSubscription.dispose();
documentSaveSubscription.dispose();
diagnosticsSubscription.dispose();
textEditorSelectionSubscription.dispose();
activeTextEditorSubscription.dispose();
Expand Down Expand Up @@ -1463,22 +1381,6 @@ async function resolveDiagnosticSuggestions(
}
}

if (suggestions.length === 0 && request.source === MEO_SPELL_DIAGNOSTIC_SOURCE) {
const spellSuggestions = document.textDocument
? await collectMeoSpellSuggestions(document.textDocument, requestedRange.from, requestedRange.to)
: [];
for (const suggestion of spellSuggestions) {
if (seen.has(suggestion)) {
continue;
}
seen.add(suggestion);
suggestions.push(suggestion);
if (suggestions.length >= MAX_DIAGNOSTIC_SUGGESTIONS) {
break;
}
}
}

return {
...emptyResponse,
suggestions
Expand Down
5 changes: 0 additions & 5 deletions src/shared/extensionConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { getActiveVscodeRawTheme, type RawVscodeTheme } from './vscodeTheme';
export const EXTENSION_CONFIG_SECTION = 'sherpaIntent';
export const LINE_NUMBERS_SETTING_KEY = 'lineNumbers.visible';
export const READ_ONLY_SETTING_KEY = 'readOnly';
export const SPELL_CHECK_SETTING_KEY = 'spellCheck.enabled';
export const VIM_MODE_BEHAVIOR_SETTING_KEY = 'vimMode.behavior';
export const VIM_MODE_SETTING_KEY = 'vimMode.enabled';
export const CODE_BLOCKS_VSCODE_THEME_SETTING_KEY = 'codeBlocks.useVscodeTheme';
Expand Down Expand Up @@ -68,10 +67,6 @@ export async function setReadOnlyEnabled(enabled: boolean): Promise<void> {
.update(READ_ONLY_SETTING_KEY, enabled, vscode.ConfigurationTarget.Global);
}

export function getSpellCheckEnabled(): boolean {
return vscode.workspace.getConfiguration(EXTENSION_CONFIG_SECTION).get<boolean>(SPELL_CHECK_SETTING_KEY, true);
}

export function getKeymapBindings(): NormalizedKeymapBinding[] {
const raw = vscode.workspace.getConfiguration(EXTENSION_CONFIG_SECTION).get<unknown>(KEYMAP_SETTING_KEY, []);
return parseKeymapBindings(raw);
Expand Down
Loading
Loading