mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-28 11:41:04 +00:00
feat(webui): migrate icons, Tooltip, WaitingMessage from vscode-ide-companion
- Move icon components (FileIcons, EditIcons, NavigationIcons, StatusIcons, SpecialIcons, StopIcon) from vscode-ide-companion to webui package - Migrate Tooltip component with CSS variable theming support - Migrate WaitingMessage and InterruptedMessage components - Enhance Button component with forwardRef, new variants (ghost, outline), loading state, and icon support - Enhance Input component with forwardRef, error state, label, and helper text - Update vscode-ide-companion to import components from @qwen-code/webui - Remove replaced local components from vscode-ide-companion - Add skipLibCheck to vscode-ide-companion tsconfig for type compatibility
This commit is contained in:
parent
af76450dee
commit
71570540cc
45 changed files with 1049 additions and 308 deletions
48
packages/webui/scripts/add-license-header.sh
Executable file
48
packages/webui/scripts/add-license-header.sh
Executable file
|
|
@ -0,0 +1,48 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script to check and add license header to files in the packages/webui directory
|
||||
# If a file doesn't have the required license header, it will be added at the top
|
||||
# Excludes Markdown files and common build/dependency directories
|
||||
|
||||
LICENSE_HEADER="/**
|
||||
* @license
|
||||
* Copyright 2025 Qwen Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/"
|
||||
|
||||
# Directory to scan (relative to script location)
|
||||
TARGET_DIR="$(dirname "$0")/../"
|
||||
|
||||
# Find all JavaScript, TypeScript, CSS, HTML, and JSX/TSX files in the target directory, excluding Markdown files
|
||||
# Also exclude common build/dependency directories
|
||||
find "$TARGET_DIR" -type f \( -name "*.js" -o -name "*.jsx" -o -name "*.ts" -o -name "*.tsx" -o -name "*.cjs" -o -name "*.mjs" -o -name "*.css" -o -name "*.html" \) -not -name "*.md" \
|
||||
-not -path "*/node_modules/*" \
|
||||
-not -path "*/dist/*" \
|
||||
-not -path "*/build/*" \
|
||||
-not -path "*/coverage/*" \
|
||||
-not -path "*/.next/*" \
|
||||
-not -path "*/out/*" \
|
||||
-not -path "*/target/*" \
|
||||
-not -path "*/vendor/*" \
|
||||
-print0 | while IFS= read -r -d '' file; do
|
||||
# Skip the script file itself
|
||||
if [[ "$(basename "$file")" != "add-license-header.sh" ]]; then
|
||||
# Check if the file starts with the license header
|
||||
if ! head -n 5 "$file" | grep -Fq "@license"; then
|
||||
echo "Adding license header to: $file"
|
||||
|
||||
# Create a temporary file with the license header followed by the original content
|
||||
temp_file=$(mktemp)
|
||||
echo "$LICENSE_HEADER" > "$temp_file"
|
||||
echo "" >> "$temp_file" # Add an empty line after the license header
|
||||
cat "$file" >> "$temp_file"
|
||||
|
||||
# Move the temporary file to replace the original file
|
||||
mv "$temp_file" "$file"
|
||||
else
|
||||
echo "License header already present in: $file"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
echo "License header check and update completed."
|
||||
Loading…
Add table
Add a link
Reference in a new issue