@davait/aipictury 1.10.4 → 1.10.5

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/ext/accountUi.js CHANGED
@@ -213,11 +213,30 @@ function register(context, { registry, sessionsView, serverUrl }) {
213
213
  const yes = 'Delete everything'
214
214
  const ok = await vscode.window.showWarningMessage('Delete everything of yours kept with your AIPictury account?', {
215
215
  modal: true, detail: 'Conversations and projects, rules, preferences, usage, your pictures and clips (Renders, and every file kept '
216
- + 'with them), remote-control links and the list of your machines — from every machine and the web app. What is on this '
217
- + 'machine stays, and is not sent back up by itself: only what you do from now on is kept again (while its switch is on).' }, yes)
216
+ + 'with them), remote-control links and the list of your machines — from every machine and the web app; and on your GPU '
217
+ + 'server, its copies of your renders, chats and attached files. What is on this machine stays, and is not sent back up by '
218
+ + 'itself: only what you do from now on is kept again (while its switch is on).' }, yes)
218
219
  if (ok !== yes) return null
219
220
  const n = await cloud.deleteEverything()
220
- return `Deleted (${n} records and files). Your account stays — sign out or keep using it.`
221
+ const there = await forgetOnServer('all')
222
+ return `Deleted (${n} records and files)${there}. Your account stays — sign out or keep using it.`
223
+ }
224
+
225
+ /** The GPU server's own copies of the account's work go too — renders, chats, attached files,
226
+ * its copy of the rules: the web app listed them (Renders) and copied them back. Said, not
227
+ * hidden, when the server cannot be reached. */
228
+ async function forgetOnServer(what) {
229
+ const server = gpuServer.url()
230
+ if (!server) return '; no GPU server is set, so nothing there was touched'
231
+ try {
232
+ const r = await fetch(`${server}/api/account/data?what=${what}`, { method: 'DELETE', signal: AbortSignal.timeout(120_000) })
233
+ if (!r.ok) throw new Error(`it answered ${r.status}`)
234
+ const d = (await r.json()).deleted || {}
235
+ return what === 'chats' ? `, and ${d.chats || 0} chats on the GPU server`
236
+ : `, and on the GPU server ${d.renders || 0} renders, ${d.chats || 0} chats and ${d.files || 0} files`
237
+ } catch (error) {
238
+ return `. The GPU server could not be reached (${error.message}): its copies stay — delete again once it answers`
239
+ }
221
240
  }
222
241
 
223
242
  const KIND_LABEL = { conversations: 'conversations', memory: 'rules', settings: 'preferences', usage: 'usage' }
@@ -228,7 +247,9 @@ function register(context, { registry, sessionsView, serverUrl }) {
228
247
  modal: true, detail: 'From every machine and the web app. What is on this machine stays.' }, yes, 'Keep them')
229
248
  if (ok !== yes) return null
230
249
  const n = await cloud.deleteKind(kind)
231
- return `No longer sent, and the ${KIND_LABEL[kind] || kind} kept before are deleted (${n} records).`
250
+ // Conversations: the GPU server's copies of the web app's chats go too (else copied back).
251
+ const there = kind === 'conversations' ? await forgetOnServer('chats') : ''
252
+ return `No longer sent, and the ${KIND_LABEL[kind] || kind} kept before are deleted (${n} records${there}).`
232
253
  }
233
254
 
234
255
  function localPreferences() {
@@ -248,7 +269,7 @@ function register(context, { registry, sessionsView, serverUrl }) {
248
269
  context.subscriptions.push({ dispose: () => { globalThis.fetch = plainFetch } })
249
270
 
250
271
  account.user().then(changed).catch(() => changed(null))
251
- return { account, cloud, signedIn, signIn, signOut, deleteCloudData, deleteKind, keeps, user: () => user }
272
+ return { account, cloud, signedIn, signIn, signOut, deleteCloudData, deleteKind, forgetOnServer, keeps, user: () => user }
252
273
  }
253
274
 
254
275
  async function projectRulesText() {
@@ -278,7 +299,7 @@ function accountSpec(ctl, note) {
278
299
  { title: 'Kept with your account', items: kinds.map(([id, label, detail]) => ({ id: `keep:${id}`, label, detail, toggle: { on: config().get(`cloud.${id}`, true) } })) },
279
300
  { title: 'Account', items: [
280
301
  { id: 'signout', label: 'Sign out', detail: 'Forgets the session on this machine: nothing of the account stays here.', actions: [{ id: 'signout', label: 'Sign out', always: true }] },
281
- { id: 'delete', label: 'Delete what is kept in the cloud', detail: 'Everything above, and your pictures and clips (Renders), from every machine and the web app. Local files stay.', actions: [{ id: 'delete', label: 'Delete…', danger: true, always: true }] },
302
+ { id: 'delete', label: 'Delete what is kept in the cloud', detail: 'Everything above, and your pictures and clips (Renders), from every machine, the web app and your GPU server. Local files stay.', actions: [{ id: 'delete', label: 'Delete…', danger: true, always: true }] },
282
303
  ] },
283
304
  ] }
284
305
  }
package/ext/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "aipictury",
3
3
  "displayName": "AIPictury",
4
4
  "description": "A coding agent and a generation studio running on your own GPU, with uncensored local models.",
5
- "version": "1.10.4",
5
+ "version": "1.10.5",
6
6
  "publisher": "aipictury",
7
7
  "license": "SEE LICENSE IN LICENSE.md",
8
8
  "engines": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davait/aipictury",
3
- "version": "1.10.4",
3
+ "version": "1.10.5",
4
4
  "description": "The AIPictury agent in a terminal: the VS Code extension's agent, on your own GPU server, signed in to your AIPictury account.",
5
5
  "bin": {
6
6
  "aipictury": "main.js"