Skip to content

Commit 8ba9eff

Browse files
committed
improve qwen endpoint support, retry behavior, and image generation
0 parents  commit 8ba9eff

442 files changed

Lines changed: 158844 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coverage

120 KB
Binary file not shown.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: 🐛 Bug Report
2+
description: Report a bug or unexpected behavior
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for reporting a bug! Please fill out the sections below so we can reproduce and fix it.
10+
11+
- type: textarea
12+
id: description
13+
attributes:
14+
label: Description
15+
description: A clear description of the bug.
16+
placeholder: What happened? What did you expect?
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: steps
22+
attributes:
23+
label: Steps to Reproduce
24+
description: Minimal steps to reproduce the issue.
25+
placeholder: |
26+
1. Go to '...'
27+
2. Click on '...'
28+
3. See error
29+
validations:
30+
required: true
31+
32+
- type: textarea
33+
id: expected
34+
attributes:
35+
label: Expected Behavior
36+
description: What should have happened instead?
37+
38+
- type: textarea
39+
id: diagnostic-bundle
40+
attributes:
41+
label: Diagnostic Bundle
42+
description: |
43+
Paste the JSON from `GET /api/support-bundle` (or visit `http://localhost:5001/api/support-bundle` in your browser).
44+
This helps us diagnose the issue with your exact environment and recent errors. **API keys are automatically redacted.**
45+
render: json
46+
placeholder: |
47+
{
48+
"system": {"python_version": "...", "platform": "..."},
49+
"recent_errors": [...],
50+
...
51+
}
52+
53+
- type: textarea
54+
id: logs
55+
attributes:
56+
label: Relevant Log Output
57+
description: Paste any relevant log excerpts from `logs/error.log` or `logs/app.log`. Use the request ID (rid:XXXX) to find related entries.
58+
render: shell
59+
60+
- type: dropdown
61+
id: environment
62+
attributes:
63+
label: Environment
64+
options:
65+
- Linux
66+
- macOS
67+
- Windows
68+
- Docker
69+
- Other
70+
validations:
71+
required: true
72+
73+
- type: input
74+
id: python-version
75+
attributes:
76+
label: Python Version
77+
placeholder: "3.12.0"
78+
79+
- type: input
80+
id: browser
81+
attributes:
82+
label: Browser (if frontend issue)
83+
placeholder: "Chrome 120, Firefox 121, Safari 17"
84+
85+
- type: textarea
86+
id: additional
87+
attributes:
88+
label: Additional Context
89+
description: Screenshots, config details, or anything else that might help.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💬 Questions & Discussion
4+
url: https://github.com/nicoboss/chatui/discussions
5+
about: Ask questions, share tips, or discuss ideas — use Discussions instead of opening an issue.
6+
- name: 📖 Documentation
7+
url: https://github.com/nicoboss/chatui/blob/main/CONTRIBUTING.md
8+
about: Check the contributing guide for setup instructions and coding conventions.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: ✨ Feature Request
2+
description: Suggest a new feature or improvement
3+
title: "[Feature]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting an improvement! Please describe what you'd like and why.
10+
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Problem Statement
15+
description: What problem does this feature solve? Is it related to a frustration?
16+
placeholder: "I'm always frustrated when..."
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Proposed Solution
24+
description: How would you like this to work?
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
id: alternatives
30+
attributes:
31+
label: Alternatives Considered
32+
description: Any alternative solutions or workarounds you've tried?
33+
34+
- type: dropdown
35+
id: area
36+
attributes:
37+
label: Area
38+
options:
39+
- Frontend (UI/UX)
40+
- Backend (API/Logic)
41+
- LLM Integration
42+
- Tools (search, fetch, browser, code exec)
43+
- Trading Module
44+
- Multi-Agent (Swarm)
45+
- DevOps / CI
46+
- Documentation
47+
- Other
48+
49+
- type: textarea
50+
id: additional
51+
attributes:
52+
label: Additional Context
53+
description: Mockups, screenshots, references, or related issues.

.github/workflows/ci.yml

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
# ═══════════════════════════════════════════════════════════════
2+
# Tofu (豆腐) — Continuous Integration
3+
# ═══════════════════════════════════════════════════════════════
4+
#
5+
# Runs on every push to main and on all pull requests.
6+
# Jobs: lint → test-unit → test-api → healthcheck
7+
# Visual E2E tests run separately (optional, non-blocking).
8+
#
9+
# ═══════════════════════════════════════════════════════════════
10+
11+
name: CI
12+
13+
on:
14+
push:
15+
branches: [main]
16+
pull_request:
17+
branches: [main]
18+
19+
concurrency:
20+
group: ci-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
env:
24+
TRADING_ENABLED: "0"
25+
PYTHONDONTWRITEBYTECODE: "1"
26+
27+
jobs:
28+
# ── Lint ─────────────────────────────────────────────────────
29+
lint:
30+
name: Lint (ruff)
31+
runs-on: ubuntu-latest
32+
timeout-minutes: 10
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- uses: actions/setup-python@v5
37+
with:
38+
python-version: "3.12"
39+
cache: pip
40+
41+
- name: Install ruff
42+
run: pip install ruff
43+
44+
- name: Ruff check
45+
run: ruff check lib/ routes/ tests/
46+
47+
# ── Unit Tests ───────────────────────────────────────────────
48+
test-unit:
49+
name: Unit Tests (Python ${{ matrix.python-version }})
50+
runs-on: ubuntu-latest
51+
needs: lint
52+
timeout-minutes: 10
53+
strategy:
54+
matrix:
55+
python-version: ["3.10", "3.12"]
56+
steps:
57+
- uses: actions/checkout@v4
58+
59+
- uses: actions/setup-python@v5
60+
with:
61+
python-version: ${{ matrix.python-version }}
62+
cache: pip
63+
64+
- name: Install dependencies
65+
run: |
66+
pip install -r requirements.txt
67+
pip install pytest pytest-cov
68+
69+
- name: Run unit tests with coverage
70+
run: >
71+
python -m pytest -m unit
72+
--cov=lib --cov=routes
73+
--cov-report=term-missing
74+
--cov-report=xml:coverage.xml
75+
--tb=short -q
76+
77+
- name: Upload coverage artifact
78+
if: matrix.python-version == '3.12'
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: coverage-report
82+
path: coverage.xml
83+
retention-days: 14
84+
if-no-files-found: ignore
85+
86+
# ── API Integration Tests ───────────────────────────────────
87+
test-api:
88+
name: API Integration Tests
89+
runs-on: ubuntu-latest
90+
needs: lint
91+
timeout-minutes: 15
92+
93+
services:
94+
postgres:
95+
image: postgres:17
96+
env:
97+
POSTGRES_USER: chatui
98+
POSTGRES_PASSWORD: chatui
99+
POSTGRES_DB: chatui
100+
ports:
101+
- 5432:5432
102+
options: >-
103+
--health-cmd "pg_isready -U chatui"
104+
--health-interval 10s
105+
--health-timeout 5s
106+
--health-retries 5
107+
108+
env:
109+
CHATUI_PG_HOST: localhost
110+
CHATUI_PG_PORT: "5432"
111+
CHATUI_PG_USER: chatui
112+
CHATUI_PG_PASSWORD: chatui
113+
CHATUI_PG_DBNAME: chatui
114+
115+
steps:
116+
- uses: actions/checkout@v4
117+
118+
- uses: actions/setup-python@v5
119+
with:
120+
python-version: "3.12"
121+
cache: pip
122+
123+
- name: Install dependencies
124+
run: |
125+
pip install -r requirements.txt
126+
pip install pytest pytest-cov
127+
128+
- name: Run API tests
129+
run: >
130+
python -m pytest -m api
131+
--cov=lib --cov=routes
132+
--cov-report=term-missing
133+
--tb=short -q
134+
135+
# ── Healthcheck ─────────────────────────────────────────────
136+
healthcheck:
137+
name: Healthcheck
138+
runs-on: ubuntu-latest
139+
needs: lint
140+
timeout-minutes: 10
141+
steps:
142+
- uses: actions/checkout@v4
143+
144+
- uses: actions/setup-python@v5
145+
with:
146+
python-version: "3.12"
147+
cache: pip
148+
149+
- name: Install dependencies
150+
run: pip install -r requirements.txt
151+
152+
- name: Run healthcheck
153+
run: python healthcheck.py
154+
155+
# ── Visual E2E Tests (optional, non-blocking) ───────────────
156+
test-visual:
157+
name: Visual E2E Tests
158+
runs-on: ubuntu-latest
159+
needs: [test-unit, test-api]
160+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
161+
continue-on-error: true
162+
timeout-minutes: 20
163+
164+
services:
165+
postgres:
166+
image: postgres:17
167+
env:
168+
POSTGRES_USER: chatui
169+
POSTGRES_PASSWORD: chatui
170+
POSTGRES_DB: chatui
171+
ports:
172+
- 5432:5432
173+
options: >-
174+
--health-cmd "pg_isready -U chatui"
175+
--health-interval 10s
176+
--health-timeout 5s
177+
--health-retries 5
178+
179+
env:
180+
CHATUI_PG_HOST: localhost
181+
CHATUI_PG_PORT: "5432"
182+
CHATUI_PG_USER: chatui
183+
CHATUI_PG_PASSWORD: chatui
184+
CHATUI_PG_DBNAME: chatui
185+
186+
steps:
187+
- uses: actions/checkout@v4
188+
189+
- uses: actions/setup-python@v5
190+
with:
191+
python-version: "3.12"
192+
cache: pip
193+
194+
- name: Install dependencies
195+
run: |
196+
pip install -r requirements.txt
197+
pip install pytest
198+
playwright install --with-deps chromium
199+
200+
- name: Run visual tests
201+
run: python -m pytest -m visual --tb=short -q
202+
203+
- name: Upload screenshots
204+
if: always()
205+
uses: actions/upload-artifact@v4
206+
with:
207+
name: screenshots
208+
path: tests/screenshots/
209+
retention-days: 7
210+
if-no-files-found: ignore

0 commit comments

Comments
 (0)