Skip to content

Commit 203d9e6

Browse files
committed
docs(ui5-ai-textarea): add docs and correct samples
do not restore previous value on generation cancelation
1 parent 0034d49 commit 203d9e6

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

packages/ai/test/pages/TextArea.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,6 @@ <h1 class="demo-title">AI TextArea Component</h1>
366366
stopTypingAnimation();
367367
currentGenerationIndex += 1;
368368

369-
// Save the stopped generation if there is content
370369
const stoppedValue = textarea.value;
371370
if (stoppedValue.trim()) {
372371
const menuItem = findMenuItemByAction(currentActionInProgress);
@@ -381,8 +380,6 @@ <h1 class="demo-title">AI TextArea Component</h1>
381380
timestamp: new Date().toISOString()
382381
});
383382

384-
// Restore the previous content
385-
textarea.value = contentBeforeGeneration;
386383
currentIndexHistory = versionHistory.length - 1;
387384
buildMenuFromConfig();
388385
updateComponentState();

packages/website/docs/_samples/ai/TextArea/Extended/main.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ function stopGeneration() {
270270
stopTypingAnimation();
271271
currentGenerationIndex += 1;
272272

273-
// Save the stopped generation if there is content
274273
const stoppedValue = textarea.value;
275274
if (stoppedValue.trim()) {
276275
const action = currentActionInProgress || 'generate';
@@ -284,8 +283,6 @@ function stopGeneration() {
284283
timestamp: new Date().toISOString()
285284
});
286285

287-
// Restore the previous content
288-
textarea.value = contentBeforeGeneration;
289286
currentIndexHistory = versionHistory.length - 1;
290287
buildMenuFromConfig();
291288
updateComponentState();

0 commit comments

Comments
 (0)