MCPcopy Create free account
hub / github.com/coder/coder / extractToolResultIDs

Function extractToolResultIDs

coderd/x/chatd/chatprompt/chatprompt_test.go:1943–1955  ·  view source on GitHub ↗
(t *testing.T, msgs ...fantasy.Message)

Source from the content-addressed store, hash-verified

1941}
1942
1943func extractToolResultIDs(t *testing.T, msgs ...fantasy.Message) []string {
1944 t.Helper()
1945 var ids []string
1946 for _, msg := range msgs {
1947 for _, part := range msg.Content {
1948 tr, ok := asToolResultPartForTest(part)
1949 if ok {
1950 ids = append(ids, tr.ToolCallID)
1951 }
1952 }
1953 }
1954 return ids
1955}
1956
1957func TestNulEscapeRoundTrip(t *testing.T) {
1958 t.Parallel()

Calls 2

asToolResultPartForTestFunction · 0.85
HelperMethod · 0.65

Tested by

no test coverage detected