Conversation
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
|
|
||
| - No inline `style="..."` attributes in HTML — **always use CSS classes or `element.style.property = value`** via CSSOM | ||
| - Script/style nonces are replaced at runtime in `logViewerProvider.ts` | ||
| - After any edit to `media/viewer.js`, validate syntax: `node --check media/viewer.js` |
There was a problem hiding this comment.
I told it to leave instructions for itself 🤷
| | `FAIL` | red | 🔴 | | ||
| | `CLI` | blue | 🔵 | | ||
| | `SQL` | purple | 🟣 | | ||
| | `REPO` | light-blue/cyan | 🩵 | | ||
| | `YAML` | yellow | 🟡 | | ||
| | `CORE` | white/light-gray | ⬜ | | ||
| | `TEST` | green | 🟢 | | ||
| | `CONF` | gray | 🩶 | | ||
| | `WORK` | orange | 🟠 | |
There was a problem hiding this comment.
It bothers me that not all the emoji are the same shame...
| } | ||
| } | ||
|
|
||
| // ── LogViewerTestCommand ───────────────────────────────────────────────────── |
There was a problem hiding this comment.
Do we have these type of comments elsewhere?
| AICLI_LOG(CLI, Info, << "[SQL ] Subchannel test: database query initiated for package lookup"); | ||
| AICLI_LOG(CLI, Info, << "[REPO] Subchannel test: fetching package metadata from remote source"); | ||
|
|
||
| // ── Continuation lines (newlines in the message become continuation rows) ── | ||
| AICLI_LOG(Core, Warning, << "Package installation encountered multiple issues:\n" | ||
| " - Dependency 'vcredist' version 14.0.30704 not found in any configured source\n" | ||
| " - Insufficient disk space on C:\\ (requires 512 MB, available 203 MB)\n" | ||
| " - Installation directory is read-only: C:\\Program Files\\TestPackage\\1.0.0"); | ||
|
|
||
| // ── Long line (should require horizontal scroll or wrap in the viewer) ─ | ||
| AICLI_LOG(Workflow, Info, << "Resolving full package dependency graph: The following packages are required " | ||
| "as dependencies and will be installed in sequence if not already present on the system: " | ||
| "Microsoft.VCRedist.2015+.x64 (>= 14.0.30704), Microsoft.DotNet.Runtime.7 (>= 7.0.14), " | ||
| "Microsoft.WebView2.Runtime (>= 113.0.1774.35), Microsoft.WindowsAppRuntime.1.4 (>= 1.4.231219000). " | ||
| "Total estimated download size: 847 MB across 4 installers."); |
There was a problem hiding this comment.
I don't see why you would use test strings that look like real logs instead of just quoting the classics like the bee movie script
| // Every 5 iterations: multi-line status summary (continuation lines). | ||
| if (i % 5 == 0) | ||
| { | ||
| AICLI_LOG(Core, Info, << "Follow iteration " << i << " status summary:\n" | ||
| " Packages checked: " << (i * 7) << "\n" | ||
| " Updates available: " << (i % 3) << "\n" | ||
| " Sources refreshed: 2"); | ||
| } | ||
|
|
||
| // Every 20 iterations: simulated error with a stack trace (continuation lines + HRESULT). | ||
| if (i % 20 == 0) | ||
| { | ||
| AICLI_LOG(Fail, Error, << "Simulated transient error at follow iteration " << i << " [HRESULT 0x80070005]:\n" | ||
| " at AppInstaller::Repository::SourceList::OpenSource(std::string_view)\n" | ||
| " at AppInstaller::CLI::Workflow::OpenSourcesForSearch(Context&)\n" | ||
| " at AppInstaller::CLI::LogViewerTestCommand::ExecuteInternal(Context&)"); | ||
| } |
There was a problem hiding this comment.
You had the perfect opportunity to do FizzBuzz in your real job and you didn't take it...
| protected: | ||
| void ExecuteInternal(Execution::Context& context) const override; | ||
| }; | ||
| // Tests the log viewer extension by emitting logs that exercise all channels, levels, subchannels, |
There was a problem hiding this comment.
Shouldn't *.js and *.js.map files also be in the .gitignore?
There was a problem hiding this comment.
Do you mean the .vscodeignore? Maybe, but understanding that is part of the "things required to actually ship this".
There was a problem hiding this comment.
I didn't realize that this wasn't compiled from a .ts. But the ones in out/ definitely don't need to be checked in.
A VS Code log viewer for WinGet logs (default for
WinGet-*.logandWinGetCOM-*.log). I've wanted this for quite some time and with somevibeexperienced professional guided AI coding I have this. Up front, I don't know if we will be able to put it in the VS Code marketplace at this time due to resource constraints. It should be easy enough to make a local .vsix withnpm run packagefrom the directory and install the generated file.It supports:
There is a debug command that generates log lines of every type (shown in the image). It includes a
--followargument that generates lines every few seconds for a while to check the tail feature.There is one significant product change, which is outputting the log level to the file now, of the format
<L>whereLis the level character:Future
Work required to make this available broadly:
Microsoft Reviewers: Open in CodeFlow