chore: initial commit of TaskTracker project

Existing ASP.NET API with vanilla JS SPA, WindowWatcher, Chrome extension, and MCP server.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-26 22:08:45 -05:00
commit e12f78c479
66 changed files with 5170 additions and 0 deletions

32
WindowWatcher/Program.cs Normal file
View File

@@ -0,0 +1,32 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using WindowWatcher;
var hostCts = new CancellationTokenSource();
var builder = Host.CreateApplicationBuilder(args);
builder.Services.Configure<WindowWatcherOptions>(
builder.Configuration.GetSection(WindowWatcherOptions.SectionName));
builder.Services.AddHttpClient("TaskTrackerApi", (sp, client) =>
{
var config = sp.GetRequiredService<Microsoft.Extensions.Options.IOptions<WindowWatcherOptions>>().Value;
client.BaseAddress = new Uri(config.ApiBaseUrl);
});
builder.Services.AddHostedService<Worker>();
var host = builder.Build();
// Run the host in a background thread
var hostTask = Task.Run(() => host.RunAsync(hostCts.Token));
// Run WinForms tray icon on the main thread
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new TrayApplicationContext(hostCts));
// Wait for host to finish
await hostTask;