@things-factory/ai-assistant 10.1.16 → 10.1.18
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/client/components/assistant-chat.ts +15 -15
- package/client/components/assistant-session-toolbar.ts +7 -7
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/translations/ja.json +13 -1
- package/translations/ms.json +13 -1
- package/translations/zh.json +13 -1
|
@@ -2420,7 +2420,7 @@ export class OxAssistantChat extends LitElement {
|
|
|
2420
2420
|
: line.role === 'system'
|
|
2421
2421
|
? html`<span
|
|
2422
2422
|
class="sys-text"
|
|
2423
|
-
title=${i18next.t('ai-assistant.text.toggle-system-note', { defaultValue: '
|
|
2423
|
+
title=${i18next.t('ai-assistant.text.toggle-system-note', { defaultValue: 'click to expand' })}
|
|
2424
2424
|
@click=${() => this.toggleSystemNote(idx)}
|
|
2425
2425
|
>${content}</span
|
|
2426
2426
|
>`
|
|
@@ -2506,7 +2506,7 @@ export class OxAssistantChat extends LitElement {
|
|
|
2506
2506
|
? html`
|
|
2507
2507
|
<div class="drag-drop-overlay">
|
|
2508
2508
|
<md-icon>cloud_upload</md-icon>
|
|
2509
|
-
<span>${i18next.t('ai-assistant.text.drop-files-here', { defaultValue: '
|
|
2509
|
+
<span>${i18next.t('ai-assistant.text.drop-files-here', { defaultValue: 'Drop images or files here' })}</span>
|
|
2510
2510
|
</div>
|
|
2511
2511
|
`
|
|
2512
2512
|
: nothing}
|
|
@@ -2529,9 +2529,9 @@ export class OxAssistantChat extends LitElement {
|
|
|
2529
2529
|
type="button"
|
|
2530
2530
|
class="action"
|
|
2531
2531
|
@click=${() => this.renderRoot.querySelector<HTMLInputElement>('#chat-file-input')?.click()}
|
|
2532
|
-
title=${i18next.t('ai-assistant.tooltip.attach-file', { defaultValue: '
|
|
2532
|
+
title=${i18next.t('ai-assistant.tooltip.attach-file', { defaultValue: 'Attach images or files (drag & drop or paste supported)' })}>
|
|
2533
2533
|
<md-icon>attach_file</md-icon>
|
|
2534
|
-
${i18next.t('ai-assistant.button.attach', { defaultValue: '
|
|
2534
|
+
${i18next.t('ai-assistant.button.attach', { defaultValue: 'Attach' })}
|
|
2535
2535
|
</button>
|
|
2536
2536
|
${hasMessages
|
|
2537
2537
|
? html`
|
|
@@ -2565,7 +2565,7 @@ export class OxAssistantChat extends LitElement {
|
|
|
2565
2565
|
<button
|
|
2566
2566
|
type="button"
|
|
2567
2567
|
class="attachment-remove"
|
|
2568
|
-
title=${i18next.t('ai-assistant.button.remove-attachment', { defaultValue: '
|
|
2568
|
+
title=${i18next.t('ai-assistant.button.remove-attachment', { defaultValue: 'Remove attachment' })}
|
|
2569
2569
|
@click=${() => this.removeAttachment(att.id)}>
|
|
2570
2570
|
<md-icon>close</md-icon>
|
|
2571
2571
|
</button>
|
|
@@ -2848,7 +2848,7 @@ export class OxAssistantChat extends LitElement {
|
|
|
2848
2848
|
this.showToast(
|
|
2849
2849
|
i18next.t('ai-assistant.text.mention-not-found', {
|
|
2850
2850
|
token,
|
|
2851
|
-
defaultValue: `#${token}
|
|
2851
|
+
defaultValue: `#${token} not found`
|
|
2852
2852
|
})
|
|
2853
2853
|
)
|
|
2854
2854
|
}
|
|
@@ -3196,11 +3196,11 @@ export class OxAssistantChat extends LitElement {
|
|
|
3196
3196
|
${folded.summarized
|
|
3197
3197
|
? i18next.t('ai-assistant.text.history-folded-summarized', {
|
|
3198
3198
|
count: folded.omitted,
|
|
3199
|
-
defaultValue: '
|
|
3199
|
+
defaultValue: 'this conversation grew long — the earlier {count} messages were folded into a summary. a new conversation is better for a different topic.'
|
|
3200
3200
|
})
|
|
3201
3201
|
: i18next.t('ai-assistant.text.history-folded', {
|
|
3202
3202
|
count: folded.omitted,
|
|
3203
|
-
defaultValue: '
|
|
3203
|
+
defaultValue: 'this conversation grew long — the earlier {count} messages were left out. a new conversation is better for a different topic.'
|
|
3204
3204
|
})}
|
|
3205
3205
|
</span>
|
|
3206
3206
|
<button class="fn-new" @click=${this.startNewFromNotice}>
|
|
@@ -3262,8 +3262,8 @@ export class OxAssistantChat extends LitElement {
|
|
|
3262
3262
|
class="run"
|
|
3263
3263
|
?disabled=${sent}
|
|
3264
3264
|
@click=${() => this.executeProposal(p, key)}>
|
|
3265
|
-
${sent ? i18next.t('ai-assistant.text.proposal-sent', { defaultValue: '
|
|
3266
|
-
: i18next.t('ai-assistant.button.run-proposal', { defaultValue: '
|
|
3265
|
+
${sent ? i18next.t('ai-assistant.text.proposal-sent', { defaultValue: 'execution requested' })
|
|
3266
|
+
: i18next.t('ai-assistant.button.run-proposal', { defaultValue: 'run' })}
|
|
3267
3267
|
</button>
|
|
3268
3268
|
${/*
|
|
3269
3269
|
Drawn only where the host has said it staged this candidate, in the host's own
|
|
@@ -3385,7 +3385,7 @@ export class OxAssistantChat extends LitElement {
|
|
|
3385
3385
|
<md-icon>report</md-icon>
|
|
3386
3386
|
<span>
|
|
3387
3387
|
${i18next.t('ai-assistant.text.ungrounded-mention', {
|
|
3388
|
-
defaultValue: '
|
|
3388
|
+
defaultValue: 'Mentions an unverified target — not present in the actual data:'
|
|
3389
3389
|
})}
|
|
3390
3390
|
<span class="ids">${ids.join(', ')}</span>
|
|
3391
3391
|
</span>
|
|
@@ -3406,7 +3406,7 @@ export class OxAssistantChat extends LitElement {
|
|
|
3406
3406
|
const open = !!line.toolUsagesOpen
|
|
3407
3407
|
const readCount = usages.filter(u => u.kind === 'read').length
|
|
3408
3408
|
const writeCount = usages.filter(u => u.kind === 'write').length
|
|
3409
|
-
const toolsLabel = i18next.t('ai-assistant.text.tools-used', { defaultValue: '
|
|
3409
|
+
const toolsLabel = i18next.t('ai-assistant.text.tools-used', { defaultValue: 'Tools used' })
|
|
3410
3410
|
/* 눈에 걸려야 하는 것을 머리줄에 올린다 — 거절·접힘이 있으면 펼치기 전에 보인다.
|
|
3411
3411
|
* (이번 사고들이 전부 그것이었다: 인자 빠진 호출이 거절됐고, 중복 제안이 접혔다.) */
|
|
3412
3412
|
const problems = usages.filter(u => u.outcome === 'rejected' || u.outcome === 'error').length
|
|
@@ -3424,12 +3424,12 @@ export class OxAssistantChat extends LitElement {
|
|
|
3424
3424
|
· read ${readCount} · write ${writeCount}${problems
|
|
3425
3425
|
? html` · <span class="tu-flag bad">${i18next.t('ai-assistant.text.tool-rejected-count', {
|
|
3426
3426
|
count: problems,
|
|
3427
|
-
defaultValue: '
|
|
3427
|
+
defaultValue: 'rejected {count}'
|
|
3428
3428
|
})}</span>`
|
|
3429
3429
|
: nothing}${folded
|
|
3430
3430
|
? html` · <span class="tu-flag">${i18next.t('ai-assistant.text.tool-folded-count', {
|
|
3431
3431
|
count: folded,
|
|
3432
|
-
defaultValue: '
|
|
3432
|
+
defaultValue: 'folded {count}'
|
|
3433
3433
|
})}</span>`
|
|
3434
3434
|
: nothing}
|
|
3435
3435
|
</span>
|
|
@@ -3471,7 +3471,7 @@ export class OxAssistantChat extends LitElement {
|
|
|
3471
3471
|
return html`
|
|
3472
3472
|
${newTurn
|
|
3473
3473
|
? html`<li class="tu-turn">
|
|
3474
|
-
${i18next.t('ai-assistant.text.tool-turn', { n: (u.iter ?? 0) + 1, defaultValue: '{n}
|
|
3474
|
+
${i18next.t('ai-assistant.text.tool-turn', { n: (u.iter ?? 0) + 1, defaultValue: 'decision {n}' })}
|
|
3475
3475
|
</li>`
|
|
3476
3476
|
: nothing}
|
|
3477
3477
|
<li class="tool-usage-item kind-${u.kind} outcome-${outcome}">
|
|
@@ -47,24 +47,24 @@ export class AssistantSessionToolbar extends LitElement {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
render() {
|
|
50
|
-
const label = i18next.t('ai-assistant.session.history', { defaultValue: '
|
|
50
|
+
const label = i18next.t('ai-assistant.session.history', { defaultValue: 'Conversation history' })
|
|
51
51
|
return html`
|
|
52
52
|
<div class="controls">
|
|
53
53
|
${this.temporary ? nothing : html`<div class="tabs" role="tablist" aria-label=${label}>
|
|
54
|
-
${!this.sessionId ? html`<button role="tab" aria-selected="true">${i18next.t('ai-assistant.session.new', { defaultValue: '
|
|
54
|
+
${!this.sessionId ? html`<button role="tab" aria-selected="true">${i18next.t('ai-assistant.session.new', { defaultValue: 'New conversation' })}</button>` : nothing}
|
|
55
55
|
${assistantRecentSessions(this.sessions, this.sessionId, this.historyEnabled ? this.maxTabs : this.sessions.length).map((session, index) => html`<button role="tab" aria-selected=${session.id === this.sessionId ? 'true' : 'false'}
|
|
56
56
|
?disabled=${this.disabled || this.loading} title=${session.name || `${label} ${index + 1}`}
|
|
57
57
|
@click=${() => this.emit('assistant-session-select', { sessionId: session.id })}>${session.name || `${label} ${index + 1}`}</button>`)}
|
|
58
58
|
</div>`}
|
|
59
59
|
<button class="session-new" ?disabled=${this.disabled || this.loading || !!this.error}
|
|
60
|
-
title=${i18next.t('ai-assistant.session.reset-help', { defaultValue: '
|
|
61
|
-
@click=${() => this.emit('assistant-session-reset')}>+ ${i18next.t('ai-assistant.session.new', { defaultValue: '
|
|
60
|
+
title=${i18next.t('ai-assistant.session.reset-help', { defaultValue: 'Keep previous history and your work, and start a new conversation. Previous messages are excluded from subsequent requests.' })}
|
|
61
|
+
@click=${() => this.emit('assistant-session-reset')}>+ ${i18next.t('ai-assistant.session.new', { defaultValue: 'New conversation' })}</button>
|
|
62
62
|
</div>
|
|
63
63
|
${this.historyEnabled ? html`<button class="history" ?disabled=${this.loading || this.disabled}
|
|
64
|
-
@click=${() => this.emit('assistant-session-history')}>${i18next.t('ai-assistant.session.all', { defaultValue: '
|
|
65
|
-
${this.loading ? html`<p role="status">${i18next.t('ai-assistant.session.loading', { defaultValue: '
|
|
64
|
+
@click=${() => this.emit('assistant-session-history')}>${i18next.t('ai-assistant.session.all', { defaultValue: 'All History' })}</button>` : nothing}
|
|
65
|
+
${this.loading ? html`<p role="status">${i18next.t('ai-assistant.session.loading', { defaultValue: 'Loading conversation history…' })}</p>` : nothing}
|
|
66
66
|
${this.error ? html`<p role="alert">${this.error} <button ?disabled=${this.loading || this.disabled}
|
|
67
|
-
@click=${() => this.emit('assistant-session-retry')}>${i18next.t('ai-assistant.session.retry', { defaultValue: '
|
|
67
|
+
@click=${() => this.emit('assistant-session-retry')}>${i18next.t('ai-assistant.session.retry', { defaultValue: 'Retry' })}</button></p>` : nothing}
|
|
68
68
|
`
|
|
69
69
|
}
|
|
70
70
|
}
|