mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-21 00:07:01 +08:00
feat(server): add real-world prompt test for copilot apis (#8629)
fix AF-1432, PD-1176
This commit is contained in:
@@ -153,6 +153,9 @@ export class ChatActionList extends LitElement {
|
||||
});
|
||||
}
|
||||
}}
|
||||
data-testid="action-${action.title
|
||||
.toLowerCase()
|
||||
.replaceAll(' ', '-')}"
|
||||
>
|
||||
${action.title}
|
||||
</div>
|
||||
|
||||
@@ -178,13 +178,17 @@ export class ChatCopyMore extends WithDisposable(LitElement) {
|
||||
this._notifySuccess('Copied to clipboard');
|
||||
}
|
||||
}}
|
||||
data-testid="action-copy-button"
|
||||
>
|
||||
${CopyIcon}
|
||||
<affine-tooltip>Copy</affine-tooltip>
|
||||
</div>`
|
||||
: nothing}
|
||||
${isLast
|
||||
? html`<div @click=${() => this.retry()}>
|
||||
? html`<div
|
||||
@click=${() => this.retry()}
|
||||
data-testid="action-retry-button"
|
||||
>
|
||||
${RetryIcon}
|
||||
<affine-tooltip>Retry</affine-tooltip>
|
||||
</div>`
|
||||
|
||||
@@ -371,6 +371,7 @@ export class ChatPanelInput extends WithDisposable(LitElement) {
|
||||
}
|
||||
}
|
||||
}}
|
||||
data-testid="chat-panel-input"
|
||||
></textarea>
|
||||
<div class="chat-panel-input-actions">
|
||||
<div
|
||||
@@ -378,6 +379,7 @@ export class ChatPanelInput extends WithDisposable(LitElement) {
|
||||
@click=${async () => {
|
||||
await this.cleanupHistories();
|
||||
}}
|
||||
data-testid="chat-panel-clear"
|
||||
>
|
||||
${ChatClearIcon}
|
||||
</div>
|
||||
@@ -410,6 +412,7 @@ export class ChatPanelInput extends WithDisposable(LitElement) {
|
||||
@click="${this.send}"
|
||||
class="chat-panel-send"
|
||||
aria-disabled=${this.isInputEmpty}
|
||||
data-testid="chat-panel-send"
|
||||
>
|
||||
${ChatSendIcon}
|
||||
</div>`}
|
||||
|
||||
@@ -379,7 +379,7 @@ export class ChatPanelMessages extends WithDisposable(ShadowlessElement) {
|
||||
: html`<div class="avatar"></div>`}
|
||||
</div>`
|
||||
: AffineAvatarIcon}
|
||||
${isUser ? 'You' : 'AFFINE AI'}
|
||||
${isUser ? 'You' : 'AFFiNE AI'}
|
||||
</div>`;
|
||||
}
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ export class ChatPanel extends WithDisposable(ShadowlessElement) {
|
||||
override render() {
|
||||
return html` <div class="chat-panel-container">
|
||||
<div class="chat-panel-title">
|
||||
<div>AFFINE AI</div>
|
||||
<div>AFFiNE AI</div>
|
||||
<div
|
||||
@click=${() => {
|
||||
AIProvider.toggleGeneralAIOnboarding?.(true);
|
||||
|
||||
Reference in New Issue
Block a user