mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-22 03:15:13 +00:00
Address review feedback: fix event handler leak, error handling, model alignment
- Move session.On handler outside loop to prevent handler accumulation (C#) - Use TrySetResult instead of SetResult to avoid duplicate-set exceptions (C#) - Wrap CreateSessionAsync in broader try/finally so client always stops (C#) - Fix PersistentRalphLoop to use maxIterations parameter instead of hardcoded 10 - Align model name to gpt-5.1-codex-mini across all doc snippets - Fix completion promise DONE -> COMPLETE in usage snippet - Replace Claude references with generic model terminology
This commit is contained in:
@@ -49,7 +49,7 @@ class RalphLoop {
|
||||
|
||||
async run(initialPrompt: string): Promise<string> {
|
||||
await this.client.start();
|
||||
const session = await this.client.createSession({ model: "gpt-5" });
|
||||
const session = await this.client.createSession({ model: "gpt-5.1-codex-mini" });
|
||||
|
||||
try {
|
||||
while (this.iteration < this.maxIterations) {
|
||||
@@ -115,7 +115,7 @@ class PersistentRalphLoop {
|
||||
async run(initialPrompt: string): Promise<string> {
|
||||
await fs.mkdir(this.workDir, { recursive: true });
|
||||
await this.client.start();
|
||||
const session = await this.client.createSession({ model: "gpt-5" });
|
||||
const session = await this.client.createSession({ model: "gpt-5.1-codex-mini" });
|
||||
|
||||
try {
|
||||
// Store initial prompt
|
||||
|
||||
Reference in New Issue
Block a user