dsh-rewind-plugin 0.19.1 → 0.20.0-alpha.2
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.en.md +30 -30
- package/README.md +27 -25
- package/docs/DETAIL.md +1 -0
- package/docs/DETAIL.zh.md +1 -0
- package/docs/preview.svg +1 -0
- package/docs/preview.zh.svg +1 -0
- package/lib/client.js +264 -24
- package/lib/index.js +231 -1
- package/lib/types/client/hidden.d.ts +22 -3
- package/lib/types/client/locales.d.ts +15 -0
- package/lib/types/client/pending.d.ts +5 -2
- package/lib/types/client/portals.d.ts +3 -4
- package/lib/types/locales.d.ts +15 -0
- package/locale/de.json +7 -0
- package/locale/en.json +2 -1
- package/locale/es.json +7 -0
- package/locale/fr.json +7 -0
- package/locale/ja.json +2 -1
- package/locale/pt.json +7 -0
- package/locale/ru.json +7 -0
- package/locale/zh.json +2 -1
- package/package.json +70 -65
package/lib/client.js
CHANGED
|
@@ -108,27 +108,30 @@ function messageTextAt(chat, seq) {
|
|
|
108
108
|
}
|
|
109
109
|
return void 0;
|
|
110
110
|
}
|
|
111
|
+
function imageRefsOf(content) {
|
|
112
|
+
const images = [];
|
|
113
|
+
for (const block of content ?? []) {
|
|
114
|
+
if (block.type !== "image") continue;
|
|
115
|
+
const attachment = block.attachment;
|
|
116
|
+
if (typeof attachment?.attachmentId !== "string" || typeof attachment.mediaType !== "string") continue;
|
|
117
|
+
images.push({
|
|
118
|
+
attachmentId: attachment.attachmentId,
|
|
119
|
+
mediaType: attachment.mediaType,
|
|
120
|
+
bytes: typeof attachment.bytes === "number" ? attachment.bytes : void 0,
|
|
121
|
+
width: typeof attachment.width === "number" ? attachment.width : void 0,
|
|
122
|
+
height: typeof attachment.height === "number" ? attachment.height : void 0,
|
|
123
|
+
name: typeof attachment.name === "string" ? attachment.name : void 0
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
return images;
|
|
127
|
+
}
|
|
111
128
|
function messageAttachmentsAt(chat, seq) {
|
|
112
129
|
if (chat === void 0) return void 0;
|
|
113
130
|
for (const node of chatNodesOf(chat)) {
|
|
114
131
|
if (node.kind !== "user" && node.kind !== "steering") continue;
|
|
115
132
|
const data = node.data;
|
|
116
133
|
if (data.seq !== seq) continue;
|
|
117
|
-
|
|
118
|
-
for (const block of data.content ?? []) {
|
|
119
|
-
if (block.type !== "image") continue;
|
|
120
|
-
const attachment = block.attachment;
|
|
121
|
-
if (typeof attachment?.attachmentId !== "string" || typeof attachment.mediaType !== "string") continue;
|
|
122
|
-
images.push({
|
|
123
|
-
attachmentId: attachment.attachmentId,
|
|
124
|
-
mediaType: attachment.mediaType,
|
|
125
|
-
bytes: typeof attachment.bytes === "number" ? attachment.bytes : void 0,
|
|
126
|
-
width: typeof attachment.width === "number" ? attachment.width : void 0,
|
|
127
|
-
height: typeof attachment.height === "number" ? attachment.height : void 0,
|
|
128
|
-
name: typeof attachment.name === "string" ? attachment.name : void 0
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
return images;
|
|
134
|
+
return imageRefsOf(data.content);
|
|
132
135
|
}
|
|
133
136
|
return void 0;
|
|
134
137
|
}
|
|
@@ -1089,6 +1092,7 @@ function steeringItemsOf(nextStep) {
|
|
|
1089
1092
|
id: item.id,
|
|
1090
1093
|
text,
|
|
1091
1094
|
attachments: attachmentsCountOf(item.content),
|
|
1095
|
+
images: imageRefsOf(item.content),
|
|
1092
1096
|
preview: previewOf(text)
|
|
1093
1097
|
};
|
|
1094
1098
|
});
|
|
@@ -1402,6 +1406,7 @@ function RewindPortals({ sessionId, sessionOf, chatOf, isMainViewSession, watchC
|
|
|
1402
1406
|
sessionId,
|
|
1403
1407
|
sessionOf,
|
|
1404
1408
|
setComposerText,
|
|
1409
|
+
restoreImages,
|
|
1405
1410
|
t
|
|
1406
1411
|
},
|
|
1407
1412
|
target.key
|
|
@@ -1463,8 +1468,9 @@ function composerText() {
|
|
|
1463
1468
|
if (surface === null) return "";
|
|
1464
1469
|
return surface.textContent ?? "";
|
|
1465
1470
|
}
|
|
1466
|
-
async function retractPending(session, itemId, text, setComposerText) {
|
|
1471
|
+
async function retractPending(session, itemId, text, setComposerText, restoreImages) {
|
|
1467
1472
|
const steering = steeringItemsOf(inboxOf(session)?.["next-step"]);
|
|
1473
|
+
const images = steering.find((item) => item.id === itemId)?.images ?? [];
|
|
1468
1474
|
let removedTarget = false;
|
|
1469
1475
|
for (const id of retractSpan(steering, itemId)) {
|
|
1470
1476
|
let accepted = false;
|
|
@@ -1478,11 +1484,19 @@ async function retractPending(session, itemId, text, setComposerText) {
|
|
|
1478
1484
|
if (!accepted) break;
|
|
1479
1485
|
if (id === itemId) removedTarget = true;
|
|
1480
1486
|
}
|
|
1481
|
-
if (removedTarget
|
|
1487
|
+
if (!removedTarget) return;
|
|
1488
|
+
if (images.length > 0 && restoreImages !== void 0) {
|
|
1489
|
+
try {
|
|
1490
|
+
await restoreImages(session.sessionId, images);
|
|
1491
|
+
} catch (error) {
|
|
1492
|
+
rewindLog.warn("retract", `image restore for ${itemId} threw`, error);
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
if (text !== null && text !== "" && composerText().trim() === "") {
|
|
1482
1496
|
setComposerText(session.sessionId, text);
|
|
1483
1497
|
}
|
|
1484
1498
|
}
|
|
1485
|
-
function RetractButton({ target, sessionId, sessionOf, setComposerText, t }) {
|
|
1499
|
+
function RetractButton({ target, sessionId, sessionOf, setComposerText, restoreImages, t }) {
|
|
1486
1500
|
const onClick = (event) => {
|
|
1487
1501
|
event.stopPropagation();
|
|
1488
1502
|
const session = sessionOf(sessionId);
|
|
@@ -1494,7 +1508,7 @@ function RetractButton({ target, sessionId, sessionOf, setComposerText, t }) {
|
|
|
1494
1508
|
t,
|
|
1495
1509
|
retract: { itemId: target.itemId, text: target.text },
|
|
1496
1510
|
onRetract: () => {
|
|
1497
|
-
void retractPending(session, target.itemId, target.text, setComposerText);
|
|
1511
|
+
void retractPending(session, target.itemId, target.text, setComposerText, restoreImages);
|
|
1498
1512
|
}
|
|
1499
1513
|
});
|
|
1500
1514
|
};
|
|
@@ -1576,9 +1590,9 @@ async function candidatesOverRpc(connection, sessionId) {
|
|
|
1576
1590
|
}
|
|
1577
1591
|
|
|
1578
1592
|
// src/client/build-info.ts
|
|
1579
|
-
var PLUGIN_VERSION = true ? "0.
|
|
1593
|
+
var PLUGIN_VERSION = true ? "0.20.0-alpha.2" : "dev";
|
|
1580
1594
|
var PLUGIN_PACKAGE = "dsh-rewind-plugin";
|
|
1581
|
-
var BUILD_HASH = true ? "
|
|
1595
|
+
var BUILD_HASH = true ? "46008907" : "dev";
|
|
1582
1596
|
|
|
1583
1597
|
// src/client/locales.ts
|
|
1584
1598
|
var en = {
|
|
@@ -1710,7 +1724,222 @@ var ja = {
|
|
|
1710
1724
|
"cleanup.readonly": "\u3053\u306E\u30C7\u30D7\u30ED\u30A4\u30E1\u30F3\u30C8\u3067\u306F\u8A2D\u5B9A\u304C\u8AAD\u307F\u53D6\u308A\u5C02\u7528\u3067\u3059",
|
|
1711
1725
|
"cleanup.unavailable": "\u3053\u306E\u30D7\u30E9\u30B0\u30A4\u30F3\u306F\u73FE\u5728\u8AAD\u307F\u8FBC\u307E\u308C\u3066\u3044\u306A\u3044\u305F\u3081\u3001\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093"
|
|
1712
1726
|
};
|
|
1713
|
-
var
|
|
1727
|
+
var es = {
|
|
1728
|
+
"button.aria": "Rebobinar hasta este mensaje",
|
|
1729
|
+
"button.title": "Rebobinar",
|
|
1730
|
+
"button.retract.aria": "Rebobinar hasta este mensaje pendiente",
|
|
1731
|
+
"button.retract.title": "Rebobinar",
|
|
1732
|
+
"popover.title": "Rebobinar hasta este mensaje",
|
|
1733
|
+
"popover.noText": "(sin texto)",
|
|
1734
|
+
"popover.retract.title": "Rebobinar hasta este mensaje pendiente",
|
|
1735
|
+
"popover.retract.target": "Pendiente \xB7 {preview}",
|
|
1736
|
+
"popover.retract.hint": "Retira este mensaje pendiente y los siguientes, sin interrumpir la ejecuci\xF3n",
|
|
1737
|
+
"popover.retract.confirm": "Confirmar rebobinado",
|
|
1738
|
+
"popover.chat": "Rebobinar solo la conversaci\xF3n",
|
|
1739
|
+
"popover.chat.hint": "Solo el contexto; el espacio de trabajo no se modifica",
|
|
1740
|
+
"popover.both": "Rebobinar conversaci\xF3n y archivos",
|
|
1741
|
+
"popover.both.hint": "Contexto y restauraci\xF3n de los archivos del espacio de trabajo",
|
|
1742
|
+
"popover.checking": "Comprobando cambios en los archivos\u2026",
|
|
1743
|
+
"popover.noChanges": "No hay cambios de archivo restaurables",
|
|
1744
|
+
"popover.backupDisabled": "Instant\xE1neas desactivadas; la restauraci\xF3n puede ser incompleta",
|
|
1745
|
+
"popover.cancel": "Cancelar",
|
|
1746
|
+
"popover.impact.loading": "Obteniendo la lista de impacto\u2026",
|
|
1747
|
+
"popover.impact.failed": "No se pudo obtener la lista de impacto: {message}",
|
|
1748
|
+
"popover.impact.none": "No hay cambios de archivo rastreados despu\xE9s del destino; no hay nada que restaurar.",
|
|
1749
|
+
"popover.impact.restore": "Restaurar {path}",
|
|
1750
|
+
"popover.impact.delete": "Eliminar {path}",
|
|
1751
|
+
"popover.confirm": "Confirmar rebobinado",
|
|
1752
|
+
"popover.back": "Atr\xE1s",
|
|
1753
|
+
"backup.title": "Copias de seguridad de instant\xE1neas",
|
|
1754
|
+
"backup.on": "Si est\xE1 activado, se crean instant\xE1neas de archivos autom\xE1ticamente para la restauraci\xF3n.",
|
|
1755
|
+
"backup.off": "Si est\xE1 desactivado, no se crean instant\xE1neas de archivos; los cambios hechos mientras est\xE1 desactivado no se pueden restaurar.",
|
|
1756
|
+
"cleanup.auto": "Limpieza autom\xE1tica",
|
|
1757
|
+
"cleanup.auto.on": "Si est\xE1 activada, las instant\xE1neas de sesiones inactivas m\xE1s all\xE1 del umbral se limpian autom\xE1ticamente.",
|
|
1758
|
+
"cleanup.auto.off": "Si est\xE1 desactivada, las instant\xE1neas no se limpian autom\xE1ticamente.",
|
|
1759
|
+
"cleanup.maxAge": "Tiempo de inactividad (d\xEDas)",
|
|
1760
|
+
"cleanup.maxAge.hint": "Se limpian las copias de seguridad de instant\xE1neas de las sesiones inactivas durante m\xE1s de este n\xFAmero de d\xEDas.",
|
|
1761
|
+
"cleanup.invalid": "Introduzca un entero positivo o d\xE9jelo vac\xEDo para usar el valor predeterminado",
|
|
1762
|
+
"cleanup.overridden": "Sobrescrito",
|
|
1763
|
+
"cleanup.reset": "Restablecer al valor predeterminado",
|
|
1764
|
+
"cleanup.save": "Guardar",
|
|
1765
|
+
"cleanup.saving": "Guardando\u2026",
|
|
1766
|
+
"cleanup.saveFailed": "La implementaci\xF3n no acept\xF3 estos valores; se conservaron para que pueda corregirlos",
|
|
1767
|
+
"cleanup.readonly": "Esta implementaci\xF3n guarda la configuraci\xF3n en modo de solo lectura",
|
|
1768
|
+
"cleanup.unavailable": "Este plugin no est\xE1 cargado, por lo que no se puede configurar ahora"
|
|
1769
|
+
};
|
|
1770
|
+
var fr = {
|
|
1771
|
+
"button.aria": "Rembobiner jusqu\u2019\xE0 ce message",
|
|
1772
|
+
"button.title": "Rembobiner",
|
|
1773
|
+
"button.retract.aria": "Rembobiner jusqu\u2019\xE0 ce message en attente",
|
|
1774
|
+
"button.retract.title": "Rembobiner",
|
|
1775
|
+
"popover.title": "Rembobiner jusqu\u2019\xE0 ce message",
|
|
1776
|
+
"popover.noText": "(sans texte)",
|
|
1777
|
+
"popover.retract.title": "Rembobiner jusqu\u2019\xE0 ce message en attente",
|
|
1778
|
+
"popover.retract.target": "En attente \xB7 {preview}",
|
|
1779
|
+
"popover.retract.hint": "Retire ce message en attente et les suivants, sans interrompre l\u2019ex\xE9cution",
|
|
1780
|
+
"popover.retract.confirm": "Confirmer le rembobinage",
|
|
1781
|
+
"popover.chat": "Rembobiner la conversation uniquement",
|
|
1782
|
+
"popover.chat.hint": "Contexte uniquement ; l\u2019espace de travail reste intact",
|
|
1783
|
+
"popover.both": "Rembobiner la conversation et les fichiers",
|
|
1784
|
+
"popover.both.hint": "Contexte et restauration des fichiers de l\u2019espace de travail",
|
|
1785
|
+
"popover.checking": "V\xE9rification des modifications de fichiers\u2026",
|
|
1786
|
+
"popover.noChanges": "Aucune modification de fichier restaurable",
|
|
1787
|
+
"popover.backupDisabled": "Instantan\xE9s d\xE9sactiv\xE9s ; la restauration peut \xEAtre incompl\xE8te",
|
|
1788
|
+
"popover.cancel": "Annuler",
|
|
1789
|
+
"popover.impact.loading": "R\xE9cup\xE9ration de la liste d\u2019impact\u2026",
|
|
1790
|
+
"popover.impact.failed": "Impossible de r\xE9cup\xE9rer la liste d\u2019impact : {message}",
|
|
1791
|
+
"popover.impact.none": "Aucune modification de fichier suivie apr\xE8s la cible ; rien \xE0 restaurer.",
|
|
1792
|
+
"popover.impact.restore": "Restaurer {path}",
|
|
1793
|
+
"popover.impact.delete": "Supprimer {path}",
|
|
1794
|
+
"popover.confirm": "Confirmer le rembobinage",
|
|
1795
|
+
"popover.back": "Retour",
|
|
1796
|
+
"backup.title": "Sauvegardes d\u2019instantan\xE9s",
|
|
1797
|
+
"backup.on": "Lorsque cette option est activ\xE9e, des instantan\xE9s de fichiers sont cr\xE9\xE9s automatiquement pour la restauration.",
|
|
1798
|
+
"backup.off": "Lorsque cette option est d\xE9sactiv\xE9e, aucun instantan\xE9 de fichier n\u2019est cr\xE9\xE9 ; les modifications effectu\xE9es pendant cette p\xE9riode ne peuvent pas \xEAtre restaur\xE9es.",
|
|
1799
|
+
"cleanup.auto": "Nettoyage automatique",
|
|
1800
|
+
"cleanup.auto.on": "Si activ\xE9, les instantan\xE9s des sessions inactives au-del\xE0 du seuil sont nettoy\xE9s automatiquement.",
|
|
1801
|
+
"cleanup.auto.off": "Si d\xE9sactiv\xE9, les instantan\xE9s ne sont pas nettoy\xE9s automatiquement.",
|
|
1802
|
+
"cleanup.maxAge": "Dur\xE9e d\u2019inactivit\xE9 (jours)",
|
|
1803
|
+
"cleanup.maxAge.hint": "Les sauvegardes d\u2019instantan\xE9s des sessions inactives depuis plus de ce nombre de jours sont nettoy\xE9es.",
|
|
1804
|
+
"cleanup.invalid": "Saisissez un entier positif, ou laissez vide pour utiliser la valeur par d\xE9faut",
|
|
1805
|
+
"cleanup.overridden": "Remplac\xE9",
|
|
1806
|
+
"cleanup.reset": "R\xE9initialiser par d\xE9faut",
|
|
1807
|
+
"cleanup.save": "Enregistrer",
|
|
1808
|
+
"cleanup.saving": "Enregistrement\u2026",
|
|
1809
|
+
"cleanup.saveFailed": "Le d\xE9ploiement n\u2019a pas accept\xE9 ces valeurs ; elles ont \xE9t\xE9 conserv\xE9es pour que vous puissiez les corriger",
|
|
1810
|
+
"cleanup.readonly": "Ce d\xE9ploiement enregistre les param\xE8tres en lecture seule",
|
|
1811
|
+
"cleanup.unavailable": "Ce plugin n\u2019est pas charg\xE9, il ne peut donc pas \xEAtre configur\xE9 pour le moment"
|
|
1812
|
+
};
|
|
1813
|
+
var de = {
|
|
1814
|
+
"button.aria": "Bis zu dieser Nachricht zur\xFCckspulen",
|
|
1815
|
+
"button.title": "Zur\xFCckspulen",
|
|
1816
|
+
"button.retract.aria": "Bis zu dieser ausstehenden Nachricht zur\xFCckspulen",
|
|
1817
|
+
"button.retract.title": "Zur\xFCckspulen",
|
|
1818
|
+
"popover.title": "Bis zu dieser Nachricht zur\xFCckspulen",
|
|
1819
|
+
"popover.noText": "(kein Text)",
|
|
1820
|
+
"popover.retract.title": "Bis zu dieser ausstehenden Nachricht zur\xFCckspulen",
|
|
1821
|
+
"popover.retract.target": "Ausstehend \xB7 {preview}",
|
|
1822
|
+
"popover.retract.hint": "Zieht diese ausstehende Nachricht und alle folgenden zur\xFCck, ohne den Lauf zu unterbrechen",
|
|
1823
|
+
"popover.retract.confirm": "Zur\xFCckspulen best\xE4tigen",
|
|
1824
|
+
"popover.chat": "Nur Unterhaltung zur\xFCckspulen",
|
|
1825
|
+
"popover.chat.hint": "Nur Kontext; Arbeitsbereich bleibt unver\xE4ndert",
|
|
1826
|
+
"popover.both": "Unterhaltung und Dateien zur\xFCckspulen",
|
|
1827
|
+
"popover.both.hint": "Kontext und Wiederherstellung der Arbeitsbereichsdateien",
|
|
1828
|
+
"popover.checking": "Datei\xE4nderungen werden gepr\xFCft\u2026",
|
|
1829
|
+
"popover.noChanges": "Keine wiederherstellbaren Datei\xE4nderungen",
|
|
1830
|
+
"popover.backupDisabled": "Snapshots deaktiviert; die Wiederherstellung kann unvollst\xE4ndig sein",
|
|
1831
|
+
"popover.cancel": "Abbrechen",
|
|
1832
|
+
"popover.impact.loading": "Auswirkungsliste wird abgerufen\u2026",
|
|
1833
|
+
"popover.impact.failed": "Auswirkungsliste konnte nicht abgerufen werden: {message}",
|
|
1834
|
+
"popover.impact.none": "Keine erfassten Datei\xE4nderungen nach dem Ziel; nichts wiederherzustellen.",
|
|
1835
|
+
"popover.impact.restore": "{path} wiederherstellen",
|
|
1836
|
+
"popover.impact.delete": "{path} l\xF6schen",
|
|
1837
|
+
"popover.confirm": "Zur\xFCckspulen best\xE4tigen",
|
|
1838
|
+
"popover.back": "Zur\xFCck",
|
|
1839
|
+
"backup.title": "Snapshot-Sicherungen",
|
|
1840
|
+
"backup.on": "Wenn aktiviert, werden automatisch Datei-Snapshots f\xFCr die Wiederherstellung erstellt.",
|
|
1841
|
+
"backup.off": "Wenn deaktiviert, werden keine Datei-Snapshots erstellt; \xC4nderungen aus dieser Zeit k\xF6nnen nicht wiederhergestellt werden.",
|
|
1842
|
+
"cleanup.auto": "Automatische Bereinigung",
|
|
1843
|
+
"cleanup.auto.on": "Wenn aktiviert, werden Snapshots von Sitzungen, deren Inaktivit\xE4t den Grenzwert \xFCberschreitet, automatisch bereinigt.",
|
|
1844
|
+
"cleanup.auto.off": "Wenn deaktiviert, werden Snapshots nicht automatisch bereinigt.",
|
|
1845
|
+
"cleanup.maxAge": "Inaktivit\xE4tsdauer (Tage)",
|
|
1846
|
+
"cleanup.maxAge.hint": "Snapshot-Sicherungen von Sitzungen, die l\xE4nger als diese Anzahl Tage inaktiv sind, werden bereinigt.",
|
|
1847
|
+
"cleanup.invalid": "Geben Sie eine positive Ganzzahl ein oder lassen Sie das Feld leer, um den Standard zu verwenden",
|
|
1848
|
+
"cleanup.overridden": "\xDCberschrieben",
|
|
1849
|
+
"cleanup.reset": "Auf Standard zur\xFCcksetzen",
|
|
1850
|
+
"cleanup.save": "Speichern",
|
|
1851
|
+
"cleanup.saving": "Speichern\u2026",
|
|
1852
|
+
"cleanup.saveFailed": "Die Bereitstellung hat diese Werte nicht \xFCbernommen; sie wurden zur Korrektur beibehalten",
|
|
1853
|
+
"cleanup.readonly": "Diese Bereitstellung speichert Einstellungen schreibgesch\xFCtzt",
|
|
1854
|
+
"cleanup.unavailable": "Dieses Plugin ist nicht geladen und kann daher gerade nicht konfiguriert werden"
|
|
1855
|
+
};
|
|
1856
|
+
var ru = {
|
|
1857
|
+
"button.aria": "\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C \u043A \u044D\u0442\u043E\u043C\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044E",
|
|
1858
|
+
"button.title": "\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C",
|
|
1859
|
+
"button.retract.aria": "\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C \u043A \u044D\u0442\u043E\u043C\u0443 \u043E\u0436\u0438\u0434\u0430\u044E\u0449\u0435\u043C\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044E",
|
|
1860
|
+
"button.retract.title": "\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C",
|
|
1861
|
+
"popover.title": "\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C \u043A \u044D\u0442\u043E\u043C\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044E",
|
|
1862
|
+
"popover.noText": "(\u043D\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u0430)",
|
|
1863
|
+
"popover.retract.title": "\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C \u043A \u044D\u0442\u043E\u043C\u0443 \u043E\u0436\u0438\u0434\u0430\u044E\u0449\u0435\u043C\u0443 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044E",
|
|
1864
|
+
"popover.retract.target": "\u041E\u0436\u0438\u0434\u0430\u0435\u0442 \xB7 {preview}",
|
|
1865
|
+
"popover.retract.hint": "\u041E\u0442\u0437\u044B\u0432\u0430\u0435\u0442 \u044D\u0442\u043E \u043E\u0436\u0438\u0434\u0430\u044E\u0449\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0438 \u043F\u043E\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435, \u043D\u0435 \u043F\u0440\u0435\u0440\u044B\u0432\u0430\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435",
|
|
1866
|
+
"popover.retract.confirm": "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u043E\u0442\u043A\u0430\u0442",
|
|
1867
|
+
"popover.chat": "\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u0431\u0435\u0441\u0435\u0434\u0443",
|
|
1868
|
+
"popover.chat.hint": "\u0422\u043E\u043B\u044C\u043A\u043E \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442; \u0440\u0430\u0431\u043E\u0447\u0430\u044F \u043E\u0431\u043B\u0430\u0441\u0442\u044C \u043D\u0435 \u0438\u0437\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F",
|
|
1869
|
+
"popover.both": "\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C \u0431\u0435\u0441\u0435\u0434\u0443 \u0438 \u0444\u0430\u0439\u043B\u044B",
|
|
1870
|
+
"popover.both.hint": "\u041A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u043E\u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438",
|
|
1871
|
+
"popover.checking": "\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u0444\u0430\u0439\u043B\u043E\u0432\u2026",
|
|
1872
|
+
"popover.noChanges": "\u041D\u0435\u0442 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043C\u044B\u0445 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u0444\u0430\u0439\u043B\u043E\u0432",
|
|
1873
|
+
"popover.backupDisabled": "\u0421\u043D\u0438\u043C\u043A\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u044B; \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u043E\u043B\u043D\u044B\u043C",
|
|
1874
|
+
"popover.cancel": "\u041E\u0442\u043C\u0435\u043D\u0430",
|
|
1875
|
+
"popover.impact.loading": "\u041F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u0435 \u0441\u043F\u0438\u0441\u043A\u0430 \u0432\u043B\u0438\u044F\u043D\u0438\u044F\u2026",
|
|
1876
|
+
"popover.impact.failed": "\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0441\u043F\u0438\u0441\u043E\u043A \u0432\u043B\u0438\u044F\u043D\u0438\u044F: {message}",
|
|
1877
|
+
"popover.impact.none": "\u041F\u043E\u0441\u043B\u0435 \u0446\u0435\u043B\u0438 \u043D\u0435\u0442 \u043E\u0442\u0441\u043B\u0435\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0445 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u0444\u0430\u0439\u043B\u043E\u0432; \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E.",
|
|
1878
|
+
"popover.impact.restore": "\u0412\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C {path}",
|
|
1879
|
+
"popover.impact.delete": "\u0423\u0434\u0430\u043B\u0438\u0442\u044C {path}",
|
|
1880
|
+
"popover.confirm": "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u043E\u0442\u043A\u0430\u0442",
|
|
1881
|
+
"popover.back": "\u041D\u0430\u0437\u0430\u0434",
|
|
1882
|
+
"backup.title": "\u0420\u0435\u0437\u0435\u0440\u0432\u043D\u044B\u0435 \u043A\u043E\u043F\u0438\u0438 \u0441\u043D\u0438\u043C\u043A\u043E\u0432",
|
|
1883
|
+
"backup.on": "\u0415\u0441\u043B\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043E, \u0441\u043D\u0438\u043C\u043A\u0438 \u0444\u0430\u0439\u043B\u043E\u0432 \u0441\u043E\u0437\u0434\u0430\u044E\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0434\u043B\u044F \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F.",
|
|
1884
|
+
"backup.off": "\u0415\u0441\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043E, \u0441\u043D\u0438\u043C\u043A\u0438 \u0444\u0430\u0439\u043B\u043E\u0432 \u043D\u0435 \u0441\u043E\u0437\u0434\u0430\u044E\u0442\u0441\u044F; \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F, \u0441\u0434\u0435\u043B\u0430\u043D\u043D\u044B\u0435 \u0432 \u044D\u0442\u043E \u0432\u0440\u0435\u043C\u044F, \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043D\u0435\u043B\u044C\u0437\u044F.",
|
|
1885
|
+
"cleanup.auto": "\u0410\u0432\u0442\u043E\u043E\u0447\u0438\u0441\u0442\u043A\u0430",
|
|
1886
|
+
"cleanup.auto.on": "\u0415\u0441\u043B\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430, \u0441\u043D\u0438\u043C\u043A\u0438 \u0441\u0435\u0430\u043D\u0441\u043E\u0432, \u043F\u0440\u043E\u0441\u0442\u0430\u0438\u0432\u0430\u044E\u0449\u0438\u0445 \u0434\u043E\u043B\u044C\u0448\u0435 \u043F\u043E\u0440\u043E\u0433\u0430, \u043E\u0447\u0438\u0449\u0430\u044E\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.",
|
|
1887
|
+
"cleanup.auto.off": "\u0415\u0441\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430, \u0441\u043D\u0438\u043C\u043A\u0438 \u043D\u0435 \u043E\u0447\u0438\u0449\u0430\u044E\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.",
|
|
1888
|
+
"cleanup.maxAge": "\u0412\u0440\u0435\u043C\u044F \u043F\u0440\u043E\u0441\u0442\u043E\u044F (\u0434\u043D\u0435\u0439)",
|
|
1889
|
+
"cleanup.maxAge.hint": "\u0420\u0435\u0437\u0435\u0440\u0432\u043D\u044B\u0435 \u043A\u043E\u043F\u0438\u0438 \u0441\u043D\u0438\u043C\u043A\u043E\u0432 \u0441\u0435\u0430\u043D\u0441\u043E\u0432, \u043F\u0440\u043E\u0441\u0442\u0430\u0438\u0432\u0430\u044E\u0449\u0438\u0445 \u0434\u043E\u043B\u044C\u0448\u0435 \u044D\u0442\u043E\u0433\u043E \u0447\u0438\u0441\u043B\u0430 \u0434\u043D\u0435\u0439, \u043E\u0447\u0438\u0449\u0430\u044E\u0442\u0441\u044F.",
|
|
1890
|
+
"cleanup.invalid": "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u043E\u043B\u043E\u0436\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0446\u0435\u043B\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u0438\u043B\u0438 \u043E\u0441\u0442\u0430\u0432\u044C\u0442\u0435 \u043F\u043E\u043B\u0435 \u043F\u0443\u0441\u0442\u044B\u043C \u0434\u043B\u044F \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",
|
|
1891
|
+
"cleanup.overridden": "\u041F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043E",
|
|
1892
|
+
"cleanup.reset": "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u043A \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044E \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",
|
|
1893
|
+
"cleanup.save": "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C",
|
|
1894
|
+
"cleanup.saving": "\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435\u2026",
|
|
1895
|
+
"cleanup.saveFailed": "\u0420\u0430\u0437\u0432\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435 \u043D\u0435 \u043F\u0440\u0438\u043D\u044F\u043B\u043E \u044D\u0442\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F; \u043E\u043D\u0438 \u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B \u0434\u043B\u044F \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F",
|
|
1896
|
+
"cleanup.readonly": "\u0412 \u044D\u0442\u043E\u043C \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0438 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F",
|
|
1897
|
+
"cleanup.unavailable": "\u042D\u0442\u043E\u0442 \u043F\u043B\u0430\u0433\u0438\u043D \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D, \u043F\u043E\u044D\u0442\u043E\u043C\u0443 \u0441\u0435\u0439\u0447\u0430\u0441 \u0435\u0433\u043E \u043D\u0435\u043B\u044C\u0437\u044F \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C"
|
|
1898
|
+
};
|
|
1899
|
+
var pt = {
|
|
1900
|
+
"button.aria": "Rebobinar at\xE9 esta mensagem",
|
|
1901
|
+
"button.title": "Rebobinar",
|
|
1902
|
+
"button.retract.aria": "Rebobinar at\xE9 esta mensagem pendente",
|
|
1903
|
+
"button.retract.title": "Rebobinar",
|
|
1904
|
+
"popover.title": "Rebobinar at\xE9 esta mensagem",
|
|
1905
|
+
"popover.noText": "(sem texto)",
|
|
1906
|
+
"popover.retract.title": "Rebobinar at\xE9 esta mensagem pendente",
|
|
1907
|
+
"popover.retract.target": "Pendente \xB7 {preview}",
|
|
1908
|
+
"popover.retract.hint": "Retira esta mensagem pendente e as seguintes, sem interromper a execu\xE7\xE3o",
|
|
1909
|
+
"popover.retract.confirm": "Confirmar rebobinamento",
|
|
1910
|
+
"popover.chat": "Rebobinar apenas a conversa",
|
|
1911
|
+
"popover.chat.hint": "Apenas o contexto; o espa\xE7o de trabalho n\xE3o \xE9 alterado",
|
|
1912
|
+
"popover.both": "Rebobinar conversa e arquivos",
|
|
1913
|
+
"popover.both.hint": "Contexto e restaura\xE7\xE3o dos arquivos do espa\xE7o de trabalho",
|
|
1914
|
+
"popover.checking": "Verificando altera\xE7\xF5es nos arquivos\u2026",
|
|
1915
|
+
"popover.noChanges": "Nenhuma altera\xE7\xE3o de arquivo restaur\xE1vel",
|
|
1916
|
+
"popover.backupDisabled": "Snapshots desativados; a restaura\xE7\xE3o pode ficar incompleta",
|
|
1917
|
+
"popover.cancel": "Cancelar",
|
|
1918
|
+
"popover.impact.loading": "Obtendo a lista de impacto\u2026",
|
|
1919
|
+
"popover.impact.failed": "N\xE3o foi poss\xEDvel obter a lista de impacto: {message}",
|
|
1920
|
+
"popover.impact.none": "Nenhuma altera\xE7\xE3o de arquivo rastreada ap\xF3s o destino; nada a restaurar.",
|
|
1921
|
+
"popover.impact.restore": "Restaurar {path}",
|
|
1922
|
+
"popover.impact.delete": "Excluir {path}",
|
|
1923
|
+
"popover.confirm": "Confirmar rebobinamento",
|
|
1924
|
+
"popover.back": "Voltar",
|
|
1925
|
+
"backup.title": "Backups de snapshots",
|
|
1926
|
+
"backup.on": "Quando ativado, snapshots de arquivos s\xE3o criados automaticamente para a restaura\xE7\xE3o.",
|
|
1927
|
+
"backup.off": "Quando desativado, nenhum snapshot de arquivo \xE9 criado; altera\xE7\xF5es feitas enquanto desativado n\xE3o podem ser restauradas.",
|
|
1928
|
+
"cleanup.auto": "Limpeza autom\xE1tica",
|
|
1929
|
+
"cleanup.auto.on": "Quando ativada, snapshots de sess\xF5es ociosas al\xE9m do limite s\xE3o limpos automaticamente.",
|
|
1930
|
+
"cleanup.auto.off": "Quando desativada, os snapshots n\xE3o s\xE3o limpos automaticamente.",
|
|
1931
|
+
"cleanup.maxAge": "Tempo ocioso (dias)",
|
|
1932
|
+
"cleanup.maxAge.hint": "Backups de snapshots de sess\xF5es ociosas h\xE1 mais deste n\xFAmero de dias s\xE3o limpos.",
|
|
1933
|
+
"cleanup.invalid": "Insira um inteiro positivo ou deixe em branco para usar o padr\xE3o",
|
|
1934
|
+
"cleanup.overridden": "Substitu\xEDdo",
|
|
1935
|
+
"cleanup.reset": "Redefinir para o padr\xE3o",
|
|
1936
|
+
"cleanup.save": "Salvar",
|
|
1937
|
+
"cleanup.saving": "Salvando\u2026",
|
|
1938
|
+
"cleanup.saveFailed": "A implanta\xE7\xE3o n\xE3o aceitou estes valores; eles foram mantidos para voc\xEA corrigir",
|
|
1939
|
+
"cleanup.readonly": "Esta implanta\xE7\xE3o armazena as configura\xE7\xF5es como somente leitura",
|
|
1940
|
+
"cleanup.unavailable": "Este plugin n\xE3o est\xE1 carregado, ent\xE3o n\xE3o pode ser configurado agora"
|
|
1941
|
+
};
|
|
1942
|
+
var CLIENT_DICTS = { en, zh, ja, es, fr, de, ru, pt };
|
|
1714
1943
|
|
|
1715
1944
|
// src/client/settings-card.tsx
|
|
1716
1945
|
var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
@@ -1903,8 +2132,19 @@ function apply(ctx) {
|
|
|
1903
2132
|
rewindLog.warn("refill", `skipping image with unsupported type ${ref.mediaType}`);
|
|
1904
2133
|
continue;
|
|
1905
2134
|
}
|
|
2135
|
+
if (typeof ref.bytes !== "number" || typeof ref.width !== "number" || typeof ref.height !== "number") {
|
|
2136
|
+
rewindLog.warn("refill", `skipping image ${ref.attachmentId}: incomplete durable reference`);
|
|
2137
|
+
continue;
|
|
2138
|
+
}
|
|
1906
2139
|
try {
|
|
1907
|
-
const result = await session.readAttachment(
|
|
2140
|
+
const result = await session.readAttachment({
|
|
2141
|
+
attachmentId: ref.attachmentId,
|
|
2142
|
+
mediaType: ref.mediaType,
|
|
2143
|
+
bytes: ref.bytes,
|
|
2144
|
+
width: ref.width,
|
|
2145
|
+
height: ref.height,
|
|
2146
|
+
...ref.name === void 0 ? {} : { name: ref.name }
|
|
2147
|
+
});
|
|
1908
2148
|
if (!result.ok) throw result.error;
|
|
1909
2149
|
const bytes = result.value.data;
|
|
1910
2150
|
files.push(new File([bytes], ref.name ?? `image-${index + 1}.${extension}`, { type: ref.mediaType }));
|
|
@@ -1914,7 +2154,7 @@ function apply(ctx) {
|
|
|
1914
2154
|
}
|
|
1915
2155
|
if (files.length === 0) return;
|
|
1916
2156
|
try {
|
|
1917
|
-
const drafts = conversation.createDrafts(sessionId, files);
|
|
2157
|
+
const drafts = conversation.createDrafts(sessionId, files, session.getSnapshot().subagent === null);
|
|
1918
2158
|
const admitted = conversation.input.for(scope).addAttachments(drafts.map((draft) => draft.id));
|
|
1919
2159
|
if (!admitted) {
|
|
1920
2160
|
rewindLog.warn("refill", `composer refused ${drafts.length} restored image(s) (busy)`);
|