refactor(workspace-context): move package to context group

This commit is contained in:
Tianyi Cui
2026-07-16 16:01:06 +08:00
parent a3f248ff52
commit 72bb02e68e
27 changed files with 81 additions and 90 deletions

View File

@@ -0,0 +1,16 @@
/**
* Content identity for workspace instruction duplicate suppression.
*
* @module @deepseek-ai/dsh-workspace-context/digest
*/
import { createHash } from 'node:crypto'
/**
* Compute the content identity used across instruction loading and session state.
* @param content - exact UTF-8 instruction text.
* @returns lowercase SHA-1 digest in hexadecimal form.
*/
export function instructionContentSha1(content: string): string {
return createHash('sha1').update(content).digest('hex')
}