You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d76dffa
Browse filesBrowse the repository at this point in the historyBrowse files
feat(task-title): auto-generate task titles for new root tasks (#2398)
* feat(task-title): auto-generate task titles for new root tasks
- Add `autoTitle` field to HistoryItem for auto-generated titles
- Implement TaskTitleService with concurrent queue (max 2 parallel requests)
- Add generateTaskTitle pure function with cleaning and fallback logic
- Integrate with first API call trigger (when totalTokensIn > 0)
- Add display priority: manual title > auto title > original prompt
- Support TASK_TITLE customizable support prompt
- Add `taskTitleGenerationEnabled` and `taskTitleApiConfigId` settings
- Update task history store with setAutoTitleIfAbsent method
- Fix history search to include both display title and original prompt
- Update TaskTitleEditor to preserve auto title when unchanged
- Add cancel/abort handling: user cancel → fallback; delete → skip
- Exclude subtasks, resumed tasks, short prompts, and rate-limited profiles
- 18 locales: en, ko, ja, zh-CN, zh-TW, es, fr, de, it, pt-BR, ru, tr, vi, hi, id, pl, ca, nl
* test(e2e): disable task title generation in e2e and Electron visual scenes
Title requests embed the task prompt, so they matched prompt-substring aimock
fixtures and consumed their sequenceIndex slots, and the async title raced the
chat scene's task header screenshot.
* fix(task-title): address pre-merge review findings
- Check the effective title profile against the current organization
allow-list before each request; a prohibited profile gets only the
fallback title.
- Evict the cache in setAutoTitleIfAbsent only when the task file is
confirmed missing, so a read or parse error cannot let a stale save
overwrite a peer's fields.
- Generate titles for prompts of any length and use the first 42
characters of the prompt as the fallback, as issue #2333 specifies.
- Store only the task id, parent id, and profile for unscheduled
candidates, and drop them when the task leaves the stack.
- Strip markdown emphasis only around words so identifiers such as
snake_case and __init__.py stay intact.
- Add provider event-wiring tests and a SettingsView save test.
* fix(history): escape task titles when the search matches only the prompt
highlightFzfMatch returned the raw text when there were no match positions.
Since the search also covers the original prompt, a prompt-only match passed
an unescaped title to dangerouslySetInnerHTML.
* fix(task-history): keep the save baseline when recording an auto title
setAutoTitleIfAbsent replaced the cached record with the full disk record.
A later stale save from this host then diffed against the peer's fields and
wrote its old values back. Copy only autoTitle into the cache and return the
disk record for display.
* fix(task-title): record the fallback when profile checks fail and honor cancel during them
A rejected profile lookup or policy check skipped the fallback title, and a
cancel while the policy check was pending still started the request.
* fix(task-history): log why an auto title could not read the task file
A read error, unparsable JSON, or an id mismatch made setAutoTitleIfAbsent
skip silently, so a corrupt task never got a title and nothing was logged.
Warn with the task id and reason; a missing file stays silent.
Also make the delete-after-early-read test stub readTaskFileForAutoTitle,
which setAutoTitleIfAbsent actually calls, so it covers the merge re-check.
* test(task-title): cover the late-result guard and delete cancellation
- Add an ignoreAbort harness option so a late title after a user cancel
reaches the aborted-signal guard instead of being rejected by the stub.
- Assert that deleteTaskWithId (with subtasks) and deleteTaskFromState
cancel title requests as deleted before removing history.
---------
Co-authored-by: daewoongoh <dw.oh@samsung.com>
0 commit comments