feat: offline in-browser "Ask MSOS" assistant (no API, zero cost)

A privacy-friendly help widget that answers visitor questions from the
site's own content and links to the full page — runs 100% in the browser,
no API, no server, no per-token cost.

- tools/build_search_index.py: parses every EN/MK/SI page into ~720
  heading-level chunks per language -> assistant/index-<lang>.json
  (lazy-loaded only when the chat is opened; gzips to ~80 KB).
- assistant.js: dependency-free BM25 search + multilingual stopword
  filtering + a curated short-answer layer for common questions, plus an
  accessible chat widget (role=dialog, keyboard, aria). CSP-safe (self only).
- assistant.css: scoped .msa-* styles in the site's teal palette;
  responsive (full-screen panel on mobile).
- Injected on 208 pages (blog WIP excluded; picks it up when that lands).

Verified in a headless browser across EN/MK/SI: curated answers, search
fallback with correct ranking (rare terms win), correct deep links,
Cyrillic + Slovene diacritics, and zero console errors. Curated MK/SI
answers are machine-drafted — proofread before launch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
popovskikandClaude Opus 4.8 committed 2026-08-04 01:29:22 +02:00
1 parent cca6fd18aa
commit f7f297bd65
214 files changed
+876

No files matched your search

+1
View File
@@ -0,0 +1 @@
[{"u":"/en/about-us/","t":"Our Team, Mission, Vision & Core Values","h":"Our Team, Mission, Vision & Core Values","x":"Our Team, Mission, Vision & Core Values. MSOS is more than an organization - it is the energy of the team behind it. Our members are the heart and driving force that inspires us, writing this story…","lang":"en"},{"u":"/en/about-us/","t":"Our Team, Mission, Vision & Core Values","h":"Our core values","x":"Our core values. Our shared values keep us connected and guide us as one team.","lang":"en"},{"u":"/en/about-us/","t":"Our Team, Mission, Vision & Core Values","h":"Volunteer spirit","x":"Volunteer spirit. The strength of MSOS comes from giving our time and energy selflessly. Every project, event, and idea in MSOS is built on the hard work of our amazing volunteers. Our volunteer spirit is a testament to the dedication, passion, and collaborative energy of our community and the reason why we grow stronger together.","lang":"en"},{"u":"/en/about-us/","t":"Our Team, Mission, Vision & Core Values","h":"Solidarity & care for each other","x":"Solidarity & care for each other. We are more than a group of students, but a family. We look after one another and support each other not just with studies, but also with everyday challenges. We are here to listen, help, and celebrate successes together. It's about giving without expecting anything in return and creating a safe, warm, and uplifting environment where everyone feels they belong.","lang":"en"},{"u":"/en/about-us/","t":"Our Team, Mission, Vision & Core Values","h":"Love for our roots & ambition for the future","x":"Love for our roots & ambition for the future. We are proud of where we come from and carry our Macedonian heritage with us, while striving for a brighter future. Our roots give us strength, and our ambition pushes us forward. Our ambition drives us to be professional, innovative, and influential leaders and role models in our host country.","lang":"en"},{"u":"/en/about-us/","t":"Our Team, Mission, Vision & Core Values","h":"Have any questions?","x":"Have any questions?. Can't find the answer you're looking for? Please chat to our friendly team.","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"Become a member","x":"Become a member. Join MSOS and find your people in Slovenia. Meet students, attend events, get support and help create projects across the Macedonian student community.","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"Why become a member?","x":"Why become a member?. Real events, real friendships Find your people Meet Macedonian students across Slovenia and build friendships outside the classroom. Feel supported Get practical help, local knowledge and a community that understands studying abroad. Join memorable events Social evenings, cultural events, sports, trips, workshops and student gatherings. Build experience Develop skills through volunteering, communication, project work and event organisation. Create something meaningful Bring ideas, join projects and help shape activities for the community. Grow your network Meet students, ","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"Find your people","x":"Find your people. Meet Macedonian students across Slovenia and build friendships outside the classroom.","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"Feel supported","x":"Feel supported. Get practical help, local knowledge and a community that understands studying abroad.","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"Join memorable events","x":"Join memorable events. Social evenings, cultural events, sports, trips, workshops and student gatherings.","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"Build experience","x":"Build experience. Develop skills through volunteering, communication, project work and event organisation.","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"Create something meaningful","x":"Create something meaningful. Bring ideas, join projects and help shape activities for the community.","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"Grow your network","x":"Grow your network. Meet students, alumni, professionals, institutions and partners.","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"Feel at home away from home","x":"Feel at home away from home. Belong to a community where you never have to explain where you come from.","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"MSOS in numbers","x":"MSOS in numbers. 0 active members 0 events and activities 0 participants 0 partners Figures to confirm before launch.","lang":"en"},{"u":"/en/become-a-member/","t":"Become a member","h":"There is more than one way to be part of MSOS","x":"There is more than one way to be part of MSOS. You do not need to organise events or lead to belong. Join in the way that fits you. Stay connected Receive updates and know whLine truncated