Commit b456848
Use session working directory in loc-breakdown canvas (#17862)
* Use session working directory in loc-breakdown canvas
Forked extension processes inherit a cwd of ~/.copilot, which is not a
git repo. With no explicit cwd input, buildReport ran git commands there
and /data returned HTTP 500, surfacing as a load error in the canvas UI.
Prefer the runtime-supplied ctx.session.workingDirectory (the user's
worktree/repo) over process.cwd() in both the open handler and the
refresh action's fallback path.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Address review nits on cwd fallback wording
- Update inputSchema cwd description to reflect that the session
working directory is the primary default, with process.cwd() as
a last-resort fallback.
- Soften the inline comment on the open handler: the issue is that
the extension process cwd is not necessarily the target session
repo, not that ~/.copilot is never a git repo.
- Mirror the docs update in the README's optional-inputs section.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 202cbb4 commit b456848
2 files changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
486 | | - | |
| 486 | + | |
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | | - | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
| |||
513 | 515 | | |
514 | 516 | | |
515 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
516 | 523 | | |
517 | | - | |
| 524 | + | |
518 | 525 | | |
519 | 526 | | |
520 | 527 | | |
| |||
0 commit comments