Skip to content

feat: add domain-agnostic WebUI with configurable LLM support - #12

Open
cavicwu-ops wants to merge 7 commits into
microsoft:mainfrom
cavicwu-ops:webui
Open

feat: add domain-agnostic WebUI with configurable LLM support#12
cavicwu-ops wants to merge 7 commits into
microsoft:mainfrom
cavicwu-ops:webui

Conversation

@cavicwu-ops

Copy link
Copy Markdown

Summary

This PR delivers a local-first, domain-agnostic WebUI for Resource2Skill and
documents how to drive it against arbitrary LLM providers. No bundled domain
data is included — the UI works with any domain seeded through the engine.

Changes

1. Documentation — LLM API configuration

  • Updated README-WebUI.md (plus a new Chinese translation README-WebUI-zh.md)
    and TUTORIAL-new-domain.md to document configuring OpenAI-compatible LLM
    endpoints
    via the WebUI LLM Configuration page or POST /api/llm.
  • Supported providers: Azure OpenAI, OpenAI, DeepSeek, Ollama, and any custom
    OpenAI-compatible server — configured as a template (provider / endpoint /
    api_key / model) defined in webui/backend/models.py (LLMTemplate).
  • A dry-run mode is documented so the "extract → chunk → write skill library"
    pipeline can be validated without calling a model.

2. WebUI (local-first visual shell)

  • A FastAPI + Vue 3 / Element Plus frontend (webui/) providing a distillation
    workbench, agent runner, LLM configuration, and artifact repository browser.
    The backend is a single-worker serial task queue; domains are pluggable with
    no UI changes required.
  • Refined the backend ingestion glue (webui/backend/fixtures.py,
    webui/backend/projects.py) and core/collector.py to route document
    extraction through the new generic module, making the whole pipeline
    domain-agnostic.

3. New files

  • doc_extract.py — a generic document-extraction module (text extraction,
    chunking, skill-name parsing, categorization) consumed by core/collector.py
    and webui/backend/fixtures.py.
  • README-WebUI-zh.md — Chinese translation of the WebUI manual.
  • .gitignore aligned so local config/secrets (webui_config.json, .key,
    webui/projects/) stay gitignored.

Verification

  • Branch is a direct descendant of origin/main; git diff origin/main...HEAD
    is the scoped delta above.
  • Import graph checked: doc_extract is imported by core/collector.py and
    webui/backend/fixtures.py.

tc10 added 6 commits July 28, 2026 16:27
- Backend: add GET /api/config (active project/domain/llm context), merged from the B checkout.
- Frontend: add Overview.vue homepage dashboard (B's) + getConfig api helper.
- App.vue: 首页(home) is now first/default nav item; LLM config stays last; Overview navigates via @Navigate.
- Includes prior C1 (shared useActiveContext store + TaskProgress), C2 (domain activation stickiness), I1 (row-click loads domains) and core engine changes (collector/llm/registry).
- Excludes node_modules, webui_config.json, .key, projects/ data (gitignored) and runtime logs.
- tasks.py: Task gains params field; submit() persists it; serializers
  expose it (foundation that makes tasks rerunnable)
- main.py: extract _submit_distill/_submit_agent helpers (pass params);
  add POST /api/tasks/{id}/rerun (400 on tasks stored without params)
- frontend: rerunTask in api.js; 重跑 button in shared TaskProgress
  (visible only when terminal + has params); wired into TaskCenter /
  DistillWorkbench / AgentConsole to auto-poll the new task

Verified earlier via TestClient + temp uvicorn :8011 + vite build
(1642 modules, exit 0). B-only redundant scripts left untouched.
Remove hardcoded IPD special-casing so the engine works for any domain:
- agent.py / projects.py: drop 'if domain == "ipd"' branch; inject generic
  R2S_DOMAIN / R2S_SKILLS_DIR / R2S_WORKSPACE for all domains instead of
  IPD_* env vars. _rewrite_mcp_for_project now applies to every domain with
  an mcp block.
- repo.py: drop IPD-specific wording in a comment.
- Frontend placeholders (AgentConsole.vue, ProjectsDomains.vue) made generic.

Docs (new):
- README-WebUI.md: generic WebUI manual (domain-driven, IPD as one example).
- TUTORIAL-new-domain.md: create-a-custom-domain walkthrough + architecture.
- CHANGELOG.md: branch divergence record vs origin/main.

NOTE: IPD example domain (domains/ipd/), distilled skills (skills_library/ipd/),
source materials (fixtures/), and agent outputs (output/ipd_workspace/) are
intentionally excluded from this commit per request.
Add shield rules so the user's local IPD example domain (domains/ipd/),
distilled skills (skills_library/ipd/), agent outputs (ipd_workspace/),
run/debug logs (*.log), scratch (_scratch/), and one-off helper scripts
are never committed. The engine is domain-agnostic; IPD is local-only work.
…/gitignore

Remove CHANGELOG.md and webui/SLICE1/2/3_OVERVIEW.md (IPD-era leftovers
merged upstream) and add the domain-agnostic doc_extract.py extractor used
by core/collector.py and webui/backend/fixtures.py. Align README-WebUI.md,
TUTORIAL-new-domain.md, .gitignore, core/collector.py and the two backend
modules with the de-IPD versions.

Built on microsoft/Resource2Skill main; this is the de-IPD delta only.
Rename the Chinese manual to README-WebUI-zh.md and add an English
translation as the default README-WebUI.md, following upstream i18n
convention. Content is identical in structure; only the language differs.
@cavicwu-ops

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

- Add lightweight i18n module (no vue-i18n dependency): Chinese text
  as key, English override map, untranslated falls back to Chinese so
  the UI never goes blank.
- Persist locale to localStorage (r2s_locale, default zh) so the choice
  sticks across refreshes.
- Add zh/EN radio toggle to the top bar bound to reactive locale state.
- Wrap all user-facing strings across App + 9 views/components in t().

Co-Authored-By: Rex <engineering-workflow-coach>
@cavicwu-ops

cavicwu-ops commented Jul 29, 2026 via email

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant