File tree Expand file tree Collapse file tree 5 files changed +15
-3
lines changed
Expand file tree Collapse file tree 5 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ - Fix some commands not working.
6+
57## 0.24.1
68
79- Fix build
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ The built-in commands are:
5050
5151` /costs ` : shows costs about current session.
5252` /repo-map-show ` : shows the current repoMap context of the session.
53+ ` /resume ` : resume a chat from previous session of this workspace folder.
5354
5455#### Custom commands
5556
Original file line number Diff line number Diff line change 9696 (merge state-db
9797 (select-keys global-cache [:chats ]))))))
9898
99- (defn update-workspaces-cache! [db]
99+ (defn ^:private normalize-db-for-write [db]
100100 (-> (select-keys db [:chats ])
101+ (update :chats (fn [chats]
102+ (into {}
103+ (map (fn [[k v]]
104+ [k (dissoc v :tool-calls )]))
105+ chats)))))
106+
107+ (defn update-workspaces-cache! [db]
108+ (-> (normalize-db-for-write db)
101109 (assoc :version version)
102110 (upsert-cache! (transit-global-db-file (:workspace-folders db)))))
Original file line number Diff line number Diff line change 295295(defn ^:private message-content->chat-content [role message-content]
296296 (case role
297297 ("user"
298+ " system"
298299 " assistant" ) (reduce
299300 (fn [m content]
300301 (case (:type content)
Original file line number Diff line number Diff line change 116116 (str " Total output tokens: " total-output-tokens)
117117 (str " Total cost: $" (shared/tokens->cost total-input-tokens total-input-cache-creation-tokens total-input-cache-read-tokens total-output-tokens model db)))]
118118 {:type :chat-messages
119- :chats {chat-id [{:role : system :content [{:type :text :text text}]}]}})
119+ :chats {chat-id [{:role " system" :content [{:type :text :text text}]}]}})
120120 " repo-map-show" {:type :chat-messages
121- :chats {chat-id [{:role : system :content [{:type :text :text (f.index/repo-map db {:as-string? true })}]}]}}
121+ :chats {chat-id [{:role " system" :content [{:type :text :text (f.index/repo-map db {:as-string? true })}]}]}}
122122
123123 " resume" (let [chats (:chats db)]
124124 ; ; Override current chat with first chat
You can’t perform that action at this time.
0 commit comments