Skip to content

Commit d141644

Browse files
committed
Update version to v1.0.5
1 parent 67d5cab commit d141644

4 files changed

Lines changed: 14 additions & 23 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ OpenAI-compatible proxy server for the CommandCode API. It exposes `/v1/chat/com
44

55
Repository: https://github.com/dev2k6/command-code-proxy-server
66

7-
Version: `v1.0.4`
7+
Version: `v1.0.5`
88

99
## Features
1010

@@ -219,7 +219,7 @@ https://api.github.com/repos/dev2k6/command-code-proxy-server/tags
219219
If the latest GitHub tag is newer than the current app version, the version line is displayed as:
220220

221221
```text
222-
v1.0.4 (latest: v1.x.x)
222+
v1.0.5 (latest: v1.x.x)
223223
```
224224

225225
## CommandCode version header

internal/api/commandcode.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ package api
33
// CommandCode API types (internal)
44

55
type CCContentPart struct {
6-
Type string `json:"type"`
7-
Text *string `json:"text,omitempty"`
8-
ID *string `json:"id,omitempty"`
9-
Name *string `json:"name,omitempty"`
10-
Input any `json:"input,omitempty"`
11-
ToolCallID *string `json:"toolCallId,omitempty"`
12-
ToolName *string `json:"toolName,omitempty"`
6+
Type string `json:"type"`
7+
Text *string `json:"text,omitempty"`
8+
ID *string `json:"id,omitempty"`
9+
Name *string `json:"name,omitempty"`
10+
Input any `json:"input,omitempty"`
11+
ToolUseID *string `json:"tool_use_id,omitempty"`
12+
Content any `json:"content,omitempty"`
1313
}
1414

1515
type CCMessage struct {

internal/proxy/convert.go

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,12 @@ func ConvertMessages(openAIMsgs []api.OpenAIMessage) []api.CCMessage {
2121
}
2222

2323
if m.Role == "tool" {
24-
toolName := m.Name
25-
if toolName == "" {
26-
toolName = toolNames[m.ToolCallID]
27-
}
2824
ccMsgs = append(ccMsgs, api.CCMessage{
2925
Role: "user",
3026
Content: []api.CCContentPart{{
31-
Type: "tool-result",
32-
ToolCallID: strPtr(m.ToolCallID),
33-
ToolName: strPtr(toolName),
34-
Text: strPtr(contentToString(m.Content)),
27+
Type: "tool_result",
28+
ToolUseID: strPtr(m.ToolCallID),
29+
Content: contentToString(m.Content),
3530
}},
3631
})
3732
continue
@@ -230,11 +225,7 @@ func parseContent(content interface{}, toolNames map[string]string) []api.CCCont
230225
if toolID == "" {
231226
toolID, _ = partMap["toolCallId"].(string)
232227
}
233-
toolName, _ := partMap["toolName"].(string)
234-
if toolName == "" {
235-
toolName = toolNames[toolID]
236-
}
237-
parts = append(parts, api.CCContentPart{Type: "tool-result", ToolCallID: strPtr(toolID), ToolName: strPtr(toolName), Text: strPtr(contentPartToString(partMap["content"]))})
228+
parts = append(parts, api.CCContentPart{Type: "tool_result", ToolUseID: strPtr(toolID), Content: contentPartToString(partMap["content"])})
238229
}
239230
}
240231
return parts

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/dev2k6/command-code-proxy-server/internal/update"
1010
)
1111

12-
const appVersion = "v1.0.4"
12+
const appVersion = "v1.0.5"
1313
const repositoryURL = "https://github.com/dev2k6/command-code-proxy-server"
1414
const debugLogging = false
1515

0 commit comments

Comments
 (0)