Skip to content

convert optimize code to a class#5

Merged
olasunkanmi-SE merged 1 commit into
mainfrom
development
Mar 30, 2024
Merged

convert optimize code to a class#5
olasunkanmi-SE merged 1 commit into
mainfrom
development

Conversation

@olasunkanmi-SE
Copy link
Copy Markdown
Owner

No description provided.

@olasunkanmi-SE olasunkanmi-SE merged commit 1502a3c into main Mar 30, 2024
olasunkanmi-dev pushed a commit that referenced this pull request Mar 21, 2026
#1  clearAllForAgent: remove try/catch — let errors propagate to caller
#2  clearWorkspaceContext cmd: add withProgress + try/catch error UX
#3  resolveWorkspacePath: resolve symlinks via fs.realpathSync before check
#4  Global rules priority: reorder to global → settings → workspace (highest)
#5  DRY getAgentId: add getWorkspaceAgentId() facade, all wrappers use it
#6  Remove dead AGENT_ID constant from BaseWebViewProvider
#7  loadGlobalRules: convert to async (fs.promises.readFile), skip ENOENT
#8  initialize() idempotency: guard against double-init, add reinitialize()
#9  Tests: OS-agnostic paths via os.tmpdir(), add init guard + facade tests
#10 FileTool: collect all violations before returning, report all denied paths
    Also fixed 4 remaining AGENT_ID references in base.ts generateResponse
olasunkanmi-dev pushed a commit that referenced this pull request Mar 21, 2026
- #1 Duplicate ID guard: acquire() rejects if id already running/waiting
- #2 AbortSignal/timeout: acquire() accepts options.signal + options.timeoutMs
- #3 Release slot leak: outer try/finally ensures unconditional slot release
  even if code between acquire() and inner try block throws
- #5 Stable sort: starvation boost uses enqueuedAt as FIFO tiebreaker
- #6 Queue depth cap: MAX_QUEUE_DEPTH=50 with ConcurrencyQueueFullError
- #7+#8 QuickPick UI: showStatus uses QuickPick with per-item cancel
- #9 Logger init: moved from field initializer to constructor body
- #13 Status bar comment: clarified alignment semantics
- #14 Localized command titles: added NLS tokens for both commands

Tests updated: duplicate ID, queue depth cap, AbortSignal, pre-aborted
signal, isPending() helper replaces setTimeout-based assertions.
olasunkanmi-dev pushed a commit that referenced this pull request Mar 21, 2026
Service (concurrency-queue.service.ts):
- #1/#8: createReleaser guards on disposed, no longer calls fireChange
- #2: drain() resolves with createReleaser(id) instead of undefined
- #3: enableTelemetry: false on logger to avoid noisy spans
- #4: waitingIds Set for O(1) duplicate-ID checks instead of Array.some
- #5: buildAbortSignal() polyfills for AbortSignal.timeout and .any
- #9: Split QueueItem into QueueItemView (exported) + QueueItemInternal (private)
- #10: boostStarvedItems mutates QueueItemInternal.priority directly
- #13: $(watch) icon for queued state instead of $(loading~spin)
- #14: JSDoc on constants explaining why not configurable

Agent service (codebuddy-agent.service.ts):
- #6: conversationId uses randomUUID() instead of Date.now()

Extension (extension.ts):
- #7: QuickPick cancel-all uses CANCEL_ALL_ID sentinel
Stanley00 pushed a commit to stanley-fork/codebuddy that referenced this pull request Mar 27, 2026
Stanley00 pushed a commit to stanley-fork/codebuddy that referenced this pull request Mar 27, 2026
olasunkanmi-SE#1  clearAllForAgent: remove try/catch — let errors propagate to caller
olasunkanmi-SE#2  clearWorkspaceContext cmd: add withProgress + try/catch error UX
olasunkanmi-SE#3  resolveWorkspacePath: resolve symlinks via fs.realpathSync before check
olasunkanmi-SE#4  Global rules priority: reorder to global → settings → workspace (highest)
olasunkanmi-SE#5  DRY getAgentId: add getWorkspaceAgentId() facade, all wrappers use it
olasunkanmi-SE#6  Remove dead AGENT_ID constant from BaseWebViewProvider
olasunkanmi-SE#7  loadGlobalRules: convert to async (fs.promises.readFile), skip ENOENT
olasunkanmi-SE#8  initialize() idempotency: guard against double-init, add reinitialize()
olasunkanmi-SE#9  Tests: OS-agnostic paths via os.tmpdir(), add init guard + facade tests
olasunkanmi-SE#10 FileTool: collect all violations before returning, report all denied paths
    Also fixed 4 remaining AGENT_ID references in base.ts generateResponse
Stanley00 pushed a commit to stanley-fork/codebuddy that referenced this pull request Mar 27, 2026
- olasunkanmi-SE#1 Duplicate ID guard: acquire() rejects if id already running/waiting
- olasunkanmi-SE#2 AbortSignal/timeout: acquire() accepts options.signal + options.timeoutMs
- olasunkanmi-SE#3 Release slot leak: outer try/finally ensures unconditional slot release
  even if code between acquire() and inner try block throws
- olasunkanmi-SE#5 Stable sort: starvation boost uses enqueuedAt as FIFO tiebreaker
- olasunkanmi-SE#6 Queue depth cap: MAX_QUEUE_DEPTH=50 with ConcurrencyQueueFullError
- olasunkanmi-SE#7+olasunkanmi-SE#8 QuickPick UI: showStatus uses QuickPick with per-item cancel
- olasunkanmi-SE#9 Logger init: moved from field initializer to constructor body
- olasunkanmi-SE#13 Status bar comment: clarified alignment semantics
- olasunkanmi-SE#14 Localized command titles: added NLS tokens for both commands

Tests updated: duplicate ID, queue depth cap, AbortSignal, pre-aborted
signal, isPending() helper replaces setTimeout-based assertions.
Stanley00 pushed a commit to stanley-fork/codebuddy that referenced this pull request Mar 27, 2026
Service (concurrency-queue.service.ts):
- olasunkanmi-SE#1/olasunkanmi-SE#8: createReleaser guards on disposed, no longer calls fireChange
- olasunkanmi-SE#2: drain() resolves with createReleaser(id) instead of undefined
- olasunkanmi-SE#3: enableTelemetry: false on logger to avoid noisy spans
- olasunkanmi-SE#4: waitingIds Set for O(1) duplicate-ID checks instead of Array.some
- olasunkanmi-SE#5: buildAbortSignal() polyfills for AbortSignal.timeout and .any
- olasunkanmi-SE#9: Split QueueItem into QueueItemView (exported) + QueueItemInternal (private)
- olasunkanmi-SE#10: boostStarvedItems mutates QueueItemInternal.priority directly
- olasunkanmi-SE#13: $(watch) icon for queued state instead of $(loading~spin)
- olasunkanmi-SE#14: JSDoc on constants explaining why not configurable

Agent service (codebuddy-agent.service.ts):
- olasunkanmi-SE#6: conversationId uses randomUUID() instead of Date.now()

Extension (extension.ts):
- olasunkanmi-SE#7: QuickPick cancel-all uses CANCEL_ALL_ID sentinel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant