mirror of
https://github.com/musistudio/claude-code-router.git
synced 2026-01-29 22:02:05 +00:00
release 1.0.71
This commit is contained in:
@@ -656,6 +656,7 @@ A huge thank you to all our sponsors for their generous support!
|
||||
- \*火
|
||||
- \*勤
|
||||
- \*\*锟
|
||||
- \*涛
|
||||
|
||||
|
||||
(If your name is masked, please contact me via my homepage email to update it with your GitHub username.)
|
||||
|
||||
@@ -600,6 +600,7 @@ jobs:
|
||||
- \*火
|
||||
- \*勤
|
||||
- \*\*锟
|
||||
- \*涛
|
||||
|
||||
(如果您的名字被屏蔽,请通过我的主页电子邮件与我联系,以便使用您的 GitHub 用户名进行更新。)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@musistudio/claude-code-router",
|
||||
"version": "1.0.70",
|
||||
"version": "1.0.71",
|
||||
"description": "Use Claude Code without an Anthropics account and route it to another LLM provider",
|
||||
"bin": {
|
||||
"ccr": "dist/cli.js"
|
||||
@@ -20,7 +20,7 @@
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fastify/static": "^8.2.0",
|
||||
"@musistudio/llms": "^1.0.44",
|
||||
"@musistudio/llms": "^1.0.45",
|
||||
"@inquirer/prompts": "^5.0.0",
|
||||
"dotenv": "^16.4.7",
|
||||
"find-process": "^2.0.0",
|
||||
|
||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
@@ -15,8 +15,8 @@ importers:
|
||||
specifier: ^5.0.0
|
||||
version: 5.5.0
|
||||
'@musistudio/llms':
|
||||
specifier: ^1.0.44
|
||||
version: 1.0.44(ws@8.18.3)
|
||||
specifier: ^1.0.45
|
||||
version: 1.0.45(ws@8.18.3)
|
||||
dotenv:
|
||||
specifier: ^16.4.7
|
||||
version: 16.6.1
|
||||
@@ -341,8 +341,8 @@ packages:
|
||||
resolution: {integrity: sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
'@musistudio/llms@1.0.44':
|
||||
resolution: {integrity: sha512-BUK0ot2ld6qrFFXJTUuud8YbtK18zi5z5RkRx4rFbNyKTWh+J1Z7bu9D0pj4+0++yZLhg9khxusuMQq6emQnrQ==}
|
||||
'@musistudio/llms@1.0.45':
|
||||
resolution: {integrity: sha512-yHoG5JDszGpzRwbjLYEY8uR5VVzoHD+vOUtoOZHDlowGTU5OPcKtLlHK3IZygE9b51qhpQHixz2xBCwHYcByzA==}
|
||||
|
||||
'@nodelib/fs.scandir@2.1.5':
|
||||
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
|
||||
@@ -1368,7 +1368,7 @@ snapshots:
|
||||
|
||||
'@lukeed/ms@2.0.2': {}
|
||||
|
||||
'@musistudio/llms@1.0.44(ws@8.18.3)':
|
||||
'@musistudio/llms@1.0.45(ws@8.18.3)':
|
||||
dependencies:
|
||||
'@anthropic-ai/sdk': 0.54.0
|
||||
'@fastify/cors': 11.1.0
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import * as React from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { HexColorPicker } from "react-colorful"
|
||||
import { cn } from "@/lib/utils"
|
||||
import { Button } from "@/components/ui/button"
|
||||
@@ -28,9 +29,10 @@ const getColorValue = (color: string): string => {
|
||||
export function ColorPicker({
|
||||
value = "",
|
||||
onChange,
|
||||
placeholder = "选择颜色...",
|
||||
placeholder,
|
||||
showPreview = true
|
||||
}: ColorPickerProps) {
|
||||
const { t } = useTranslation()
|
||||
const [open, setOpen] = React.useState(false)
|
||||
const [customColor, setCustomColor] = React.useState("")
|
||||
|
||||
@@ -78,7 +80,7 @@ export function ColorPicker({
|
||||
/>
|
||||
)}
|
||||
<span className="truncate flex-1">
|
||||
{value || placeholder}
|
||||
{value || placeholder || t('color_picker.placeholder')}
|
||||
</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
||||
<path d="m7 15 5 5 5-5"/>
|
||||
@@ -91,14 +93,14 @@ export function ColorPicker({
|
||||
<div className="space-y-4">
|
||||
{/* 颜色选择器标题 */}
|
||||
<div className="flex items-center justify-between">
|
||||
<h4 className="text-sm font-semibold">颜色选择器</h4>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
<h4 className="text-sm font-semibold">{t('color_picker.title')}</h4>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-6 px-2 text-xs"
|
||||
onClick={() => handleColorChange("")}
|
||||
>
|
||||
清除
|
||||
{t('color_picker.clear')}
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
@@ -110,7 +112,7 @@ export function ColorPicker({
|
||||
/>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="text-sm font-medium truncate">
|
||||
{value || "未选择颜色"}
|
||||
{value || t('color_picker.no_color_selected')}
|
||||
</div>
|
||||
{value && value.startsWith("#") && (
|
||||
<div className="text-xs text-muted-foreground font-mono">
|
||||
@@ -131,7 +133,7 @@ export function ColorPicker({
|
||||
|
||||
{/* 自定义颜色输入 */}
|
||||
<div className="space-y-2">
|
||||
<label className="text-sm font-medium">自定义颜色</label>
|
||||
<label className="text-sm font-medium">{t('color_picker.custom_color')}</label>
|
||||
<div className="flex gap-2">
|
||||
<Input
|
||||
type="text"
|
||||
@@ -140,8 +142,8 @@ export function ColorPicker({
|
||||
placeholder="#RRGGBB"
|
||||
className="font-mono flex-1"
|
||||
/>
|
||||
<Button
|
||||
size="sm"
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={() => {
|
||||
if (customColor && /^#[0-9A-F]{6}$/i.test(customColor)) {
|
||||
handleColorChange(customColor)
|
||||
@@ -150,11 +152,11 @@ export function ColorPicker({
|
||||
}}
|
||||
disabled={!customColor || !/^#[0-9A-F]{6}$/i.test(customColor)}
|
||||
>
|
||||
应用
|
||||
{t('color_picker.apply')}
|
||||
</Button>
|
||||
</div>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
输入十六进制颜色值 (例如: #FF0000)
|
||||
{t('color_picker.hex_input_help')}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -194,6 +194,15 @@
|
||||
"template_download_success_desc": "Configuration template has been downloaded to your device",
|
||||
"template_download_failed": "Failed to download template"
|
||||
},
|
||||
"color_picker": {
|
||||
"placeholder": "Select color...",
|
||||
"title": "Color Picker",
|
||||
"clear": "Clear",
|
||||
"no_color_selected": "No color selected",
|
||||
"custom_color": "Custom Color",
|
||||
"apply": "Apply",
|
||||
"hex_input_help": "Enter hex color value (e.g.: #FF0000)"
|
||||
},
|
||||
"log_viewer": {
|
||||
"title": "Log Viewer",
|
||||
"close": "Close",
|
||||
|
||||
@@ -194,6 +194,15 @@
|
||||
"template_download_success_desc": "配置模板已下载到您的设备",
|
||||
"template_download_failed": "模板下载失败"
|
||||
},
|
||||
"color_picker": {
|
||||
"placeholder": "选择颜色...",
|
||||
"title": "颜色选择器",
|
||||
"clear": "清除",
|
||||
"no_color_selected": "未选择颜色",
|
||||
"custom_color": "自定义颜色",
|
||||
"apply": "应用",
|
||||
"hex_input_help": "输入十六进制颜色值 (例如: #FF0000)"
|
||||
},
|
||||
"log_viewer": {
|
||||
"title": "日志查看器",
|
||||
"close": "关闭",
|
||||
|
||||
Reference in New Issue
Block a user