rapport spec as attachment

This commit is contained in:
felix
2026-09-26 16:54:49 +02:00
parent d120237521
commit 4c81c21261
12 changed files with 141 additions and 58 deletions

View File

@@ -5,10 +5,7 @@ import { action } from '@ember/object';
import { task, restartableTask, timeout } from 'ember-concurrency';
import ENV from 'frontend-lblod-chat/config/environment';
import { setting } from 'frontend-lblod-chat/utils/setting';
import {
ANSWER_CEILING_MS,
FILE_CEILING_MS,
} from 'frontend-lblod-chat/utils/ceilings';
import { ANSWER_CEILING_MS } from 'frontend-lblod-chat/utils/ceilings';
const POLL_MS = 3000;
@@ -60,17 +57,8 @@ export default class ChatWindow extends Component {
);
}
// Waiting for a file: an attachment has no url yet.
get waitingForFile() {
return this.messages.some(
(m) =>
this.age(m.created) < FILE_CEILING_MS &&
m.attachments.some((a) => !a.url),
);
}
get waiting() {
return this.waitingForAnswer || this.waitingForFile;
return this.waitingForAnswer;
}
// One loop. Runs while there is something to wait for, and not otherwise.