Skip to content

feat(jmanus): inhouse tool call v4 #153

feat(jmanus): inhouse tool call v4

feat(jmanus): inhouse tool call v4 #153

#
# Copyright 2024-2025 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: ๐Ÿ” Check Chinese Content in Jmanus
on:
pull_request:
paths:
- 'spring-ai-alibaba-jmanus/src/main/java/**/*.java'
- 'spring-ai-alibaba-jmanus/ui-vue3/src/**'
permissions:
contents: read
jobs:
check-chinese-content:
runs-on: ubuntu-latest
name: Check for Chinese content in Jmanus
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Check Chinese content in Jmanus
run: |
echo "๐Ÿ” Checking for Chinese content in Jmanus Java and frontend files..."
echo "๐Ÿ“ Checking directories:"
echo " - spring-ai-alibaba-jmanus/src/main/java"
echo " - spring-ai-alibaba-jmanus/ui-vue3/src (excluding i18n files)"
echo ""
if python tools/scripts/check-chinese-content.py --fail-on-found; then
echo "โœ… No Chinese content found - Check passed!"
else
echo ""
echo "## ๐Ÿšจ Chinese Content Detected in Jmanus"
echo ""
echo "Chinese content has been detected in Jmanus Java or frontend files."
echo ""
echo "### Detailed Check Results:"
python tools/scripts/check-chinese-content.py
echo ""
echo "### Modification Suggestions:"
echo ""
echo "1. **Chinese Comments** โ†’ Change to English Comments"
echo " Example:"
echo " // โŒ Incorrect: // ่ฟ™ๆ˜ฏไธ€ไธช็”จๆˆทๆœๅŠก็ฑป"
echo " // โœ… Correct: // This is a user service class"
echo ""
echo "2. **Chinese Strings** โ†’ Extract to resource files or use English"
echo " Example:"
echo " // โŒ Incorrect: String message = \"็”จๆˆทไธๅญ˜ๅœจ\";"
echo " // โœ… Correct: String message = messageSource.getMessage(\"user.not.found\", null, locale);"
echo ""
echo "3. **Chinese Identifiers** โ†’ Use English identifiers"
echo " Example:"
echo " // โŒ Incorrect: String ็”จๆˆทๅ = \"admin\";"
echo " // โœ… Correct: String username = \"admin\";"
echo ""
echo "4. **Vue Template Content** โ†’ Use i18n for internationalization"
echo " Example:"
echo " <!-- โŒ Incorrect: <div>็”จๆˆท็ฎก็†</div> -->"
echo " <!-- โœ… Correct: <div>{{ \$t('user.management') }}</div> -->"
echo ""
echo "**Note:** i18n configuration files are automatically excluded from this check."
echo ""
echo "Please fix the Chinese content issues and commit the changes."
exit 1
fi