Skip to content

Commit 46e85b2

Browse files
stephentoubCopilot
andcommitted
Address review and CI follow-ups
Fix the generated Python docstring escaping that CodeQL flagged, correct dotted-key normalization in the Data compatibility shim, update the stale Go local-cli docs snippet for the newer typed event API, and apply the Python formatter change required by CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b127325 commit 46e85b2

4 files changed

Lines changed: 138 additions & 126 deletions

File tree

docs/setup/local-cli.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,10 @@ func main() {
9999

100100
session, _ := client.CreateSession(ctx, &copilot.SessionConfig{Model: "gpt-4.1"})
101101
response, _ := session.SendAndWait(ctx, copilot.MessageOptions{Prompt: "Hello!"})
102-
if d, ok := response.Data.(*copilot.AssistantMessageData); ok {
103-
fmt.Println(d.Content)
102+
if response != nil {
103+
if d, ok := response.Data.(*copilot.AssistantMessageData); ok {
104+
fmt.Println(d.Content)
105+
}
104106
}
105107
}
106108
```
@@ -117,8 +119,10 @@ defer client.Stop()
117119

118120
session, _ := client.CreateSession(ctx, &copilot.SessionConfig{Model: "gpt-4.1"})
119121
response, _ := session.SendAndWait(ctx, copilot.MessageOptions{Prompt: "Hello!"})
120-
if d, ok := response.Data.(*copilot.AssistantMessageData); ok {
121-
fmt.Println(d.Content)
122+
if response != nil {
123+
if d, ok := response.Data.(*copilot.AssistantMessageData); ok {
124+
fmt.Println(d.Content)
125+
}
122126
}
123127
```
124128

0 commit comments

Comments
 (0)