mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-11 11:18:34 +00:00
Revert "fix: type 'reasoning' was provided without its required follo… (#2648)
This commit is contained in:
@@ -873,6 +873,7 @@ export namespace SessionPrompt {
|
||||
if (value.id in reasoningMap) {
|
||||
const part = reasoningMap[value.id]
|
||||
part.text = part.text.trimEnd()
|
||||
|
||||
part.time = {
|
||||
...part.time,
|
||||
end: Date.now(),
|
||||
@@ -890,7 +891,6 @@ export namespace SessionPrompt {
|
||||
type: "tool",
|
||||
tool: value.toolName,
|
||||
callID: value.id,
|
||||
metadata: value.providerMetadata,
|
||||
state: {
|
||||
status: "pending",
|
||||
},
|
||||
@@ -910,7 +910,6 @@ export namespace SessionPrompt {
|
||||
const part = await Session.updatePart({
|
||||
...match,
|
||||
tool: value.toolName,
|
||||
metadata: match.metadata,
|
||||
state: {
|
||||
status: "running",
|
||||
input: value.input,
|
||||
@@ -1017,7 +1016,6 @@ export namespace SessionPrompt {
|
||||
sessionID: assistantMsg.sessionID,
|
||||
type: "text",
|
||||
text: "",
|
||||
metadata: value.providerMetadata,
|
||||
time: {
|
||||
start: Date.now(),
|
||||
},
|
||||
@@ -1027,7 +1025,6 @@ export namespace SessionPrompt {
|
||||
case "text-delta":
|
||||
if (currentText) {
|
||||
currentText.text += value.text
|
||||
if (value.providerMetadata) currentText.metadata = value.providerMetadata
|
||||
if (currentText.text) await Session.updatePart(currentText)
|
||||
}
|
||||
break
|
||||
@@ -1035,7 +1032,6 @@ export namespace SessionPrompt {
|
||||
case "text-end":
|
||||
if (currentText) {
|
||||
currentText.text = currentText.text.trimEnd()
|
||||
if (value.providerMetadata) currentText.metadata = value.providerMetadata
|
||||
currentText.time = {
|
||||
start: Date.now(),
|
||||
end: Date.now(),
|
||||
|
||||
Reference in New Issue
Block a user