Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
b35d815 to
c0f64e9
Compare
6478817 to
f55e5d4
Compare
c0f64e9 to
b0e75df
Compare
f55e5d4 to
11aeeb0
Compare
b0e75df to
f06f538
Compare
11aeeb0 to
be0adac
Compare
f06f538 to
09ff296
Compare
09ff296 to
529a39b
Compare
be0adac to
809aae2
Compare
809aae2 to
93d2b9c
Compare
00c15d4 to
af9c082
Compare
93d2b9c to
5f14de7
Compare
af9c082 to
746f730
Compare
ssncferreira
left a comment
There was a problem hiding this comment.
LGTM 💪 just a couple of nits
provider/copilot.go
Outdated
| return nil, fmt.Errorf("read body: %w", err) | ||
| } | ||
| reqPayload, err := responses.NewResponsesRequestPayload(payload) | ||
| reqPayload, err := responses.NewResponsesRequestPayload(payload, slog.Make()) |
There was a problem hiding this comment.
This creates a no-op logger, right? Maybe we can pass the logger as a param to lastUserPrompt (which is currently the only one needing the logger), since it is called from the interception, it could use the interception logger, no?
There was a problem hiding this comment.
Ah good catch, I was too hasty and somehow though this is test file.
This makes me re-think adding logger as part of ResponsesRequestPayload struct since there is no logger to pass here (logger is set in Setup method). I'll revet the logger change and add it as a parameter to lastUserPrompt which is a bit ugly but I don't want to make this PR even more complicated.
intercept/responses/reqpayload.go
Outdated
| // empty string, false, nil. Unexpected shapes are treated as unsupported and do | ||
| // not fail the request path. | ||
| func (p *ResponsesRequestPayload) lastUserPrompt(ctx context.Context) (string, bool, error) { | ||
| inputItems := gjson.GetBytes(p.payload, reqPathInput) |
There was a problem hiding this comment.
nit: Maybe we should keep the p nil check?
… to sturct and methods on pointer type
2e26427 to
1aa5101
Compare

Moved
correlatingToolCallID()andlastUserPrompt()methods fromresponsesInterceptionBasetoResponsesRequestPayload