This commit is contained in:
2026-07-06 00:01:34 +07:00
parent 2729408ef3
commit e7470e955e
108 changed files with 4131 additions and 529 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "9router",
"version": "0.5.12",
"version": "0.5.18",
"description": "9Router CLI - Start and manage 9Router server",
"bin": {
"9router": "./cli.js"

View File

@@ -78,6 +78,7 @@ const PROVIDER_MODELS = {
{ id: "grok-code-fast-1" },
],
kr: [
{ id: "claude-sonnet-5" },
{ id: "claude-sonnet-4.5" },
{ id: "claude-haiku-4.5" },
],

View File

@@ -2,14 +2,65 @@
# IPC: stdin JSON commands, stdout JSON events
param([string]$IconPath, [string]$Tooltip)
$ErrorActionPreference = "Stop"
Add-Type @"
using System;
using System.Runtime.InteropServices;
public static class WinDpiAwareness {
public static IntPtr PerMonitorAwareV2 { get { return new IntPtr(-4); } }
public static IntPtr PerMonitorAware { get { return new IntPtr(-3); } }
[DllImport("user32.dll")]
public static extern bool SetProcessDpiAwarenessContext(IntPtr value);
[DllImport("user32.dll")]
public static extern IntPtr SetThreadDpiAwarenessContext(IntPtr value);
[DllImport("shcore.dll")]
public static extern int SetProcessDpiAwareness(int value);
[DllImport("user32.dll")]
public static extern bool SetProcessDPIAware();
}
"@
function Enable-HighDpiAwareness {
$contexts = @(
[WinDpiAwareness]::PerMonitorAwareV2,
[WinDpiAwareness]::PerMonitorAware
)
foreach ($context in $contexts) {
try {
if ([WinDpiAwareness]::SetProcessDpiAwarenessContext($context)) { break }
} catch {}
}
try { [WinDpiAwareness]::SetProcessDpiAwareness(2) | Out-Null } catch {}
try { [WinDpiAwareness]::SetProcessDPIAware() | Out-Null } catch {}
foreach ($context in $contexts) {
try {
$previous = [WinDpiAwareness]::SetThreadDpiAwarenessContext($context)
if ($previous -ne [IntPtr]::Zero) { break }
} catch {}
}
}
Enable-HighDpiAwareness
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
$ErrorActionPreference = "Stop"
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
[Console]::InputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
[System.Windows.Forms.Application]::EnableVisualStyles()
[System.Windows.Forms.Application]::SetCompatibleTextRenderingDefault($false)
$script:notifyIcon = New-Object System.Windows.Forms.NotifyIcon
$script:notifyIcon.Icon = New-Object System.Drawing.Icon($IconPath)
$script:notifyIcon.Text = $Tooltip