Skip to content

Commit 372305c

Browse files
committed
Allow disable chat title generation via chat title as false.
Fixes #322
1 parent 90a5fb7 commit 372305c

4 files changed

Lines changed: 19 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Allow disable chat title generation via `chat title` as `false`. #322
6+
57
## 0.103.2
68

79
- Support dynamic string content in markdown configs (agents, skills). #317

docs/config.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,20 @@
269269
"description": "Path to a custom netrc credential file. When null, searches ~/.netrc or ~/_netrc.",
270270
"markdownDescription": "Path to a custom netrc credential file. When null, searches ~/.netrc or ~/_netrc.",
271271
"default": null
272+
},
273+
"chat": {
274+
"type": "object",
275+
"description": "Chat feature settings.",
276+
"markdownDescription": "Chat feature settings.",
277+
"additionalProperties": false,
278+
"properties": {
279+
"title": {
280+
"type": "boolean",
281+
"description": "Whether to automatically generate a title for new chats.",
282+
"markdownDescription": "Whether to automatically generate a title for new chats.",
283+
"default": true
284+
}
285+
}
272286
}
273287
},
274288
"definitions": {

src/eca/config.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
:skillCreate "${classpath:prompts/skill_create.md}"
133133
:completion "${classpath:prompts/inline_completion.md}"
134134
:rewrite "${classpath:prompts/rewrite.md}"}
135+
:chat {:title true}
135136
:hooks {}
136137
:rules []
137138
:commands []

src/eca/features/chat.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,8 @@
11891189
(when-let [usage (shared/usage-msg->usage usage full-model chat-ctx)]
11901190
(send-content! chat-ctx :system (merge {:type :usage} usage))))]
11911191
(assert-compatible-apis-between-models! db chat-id provider config)
1192-
(when-not (get-in db [:chats chat-id :title])
1192+
(when (and (not (get-in db [:chats chat-id :title]))
1193+
(get-in config [:chat :title]))
11931194
(future* config
11941195
(when-let [{:keys [output-text]} (llm-api/sync-prompt!
11951196
{:provider provider

0 commit comments

Comments
 (0)