feat: add dual-action translation (cached/regenerate) in HypaV3 modal
Implements shift+click (desktop) and double tap (mobile) for regenerating translations while maintaining regular click/tap for cached translations.
This commit is contained in:
@@ -854,7 +854,7 @@ class HypaProcesserEx extends HypaProcesser {
|
||||
summaryChunkVectors: SummaryChunkVector[] = [];
|
||||
|
||||
// Calculate dot product similarity between two vectors
|
||||
similarity(a: VectorArray, b: VectorArray) {
|
||||
similarity(a: VectorArray, b: VectorArray): number {
|
||||
let dot = 0;
|
||||
|
||||
for (let i = 0; i < a.length; i++) {
|
||||
@@ -864,7 +864,7 @@ class HypaProcesserEx extends HypaProcesser {
|
||||
return dot;
|
||||
}
|
||||
|
||||
async addSummaryChunks(chunks: SummaryChunk[]) {
|
||||
async addSummaryChunks(chunks: SummaryChunk[]): Promise<void> {
|
||||
// Maintain the superclass's caching structure by adding texts
|
||||
const texts = chunks.map((chunk) => chunk.text);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user