Skip to content

Github mirror of "mediawiki/extensions/WandaScribe" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Notifications You must be signed in to change notification settings

wikimedia/mediawiki-extensions-WandaScribe

Repository files navigation

WandaScribe - AI Writing Assistant for MediaWiki

WandaScribe is a MediaWiki extension that provides literary assistance by utilizing the LLM capability of the Wanda extension. It helps users write better content in the default wikitext edit window with features like spell check, grammar check, text improvement, and more.

Features

  • Real-time Spelling Assistance: Shows suggestions for misspelled words near the cursor as you type
  • Grammar Checking: Identifies and suggests corrections for grammatical errors
  • Text Improvement: AI-powered suggestions to make your text clearer and more engaging
  • Tone Adjustment: Convert text between formal and casual tones
  • Text Simplification: Make complex text easier to understand
  • Text Expansion: Add more details and context to brief text
  • Summarization: Create concise summaries of longer text
  • Integrated UI: Assistance panel appears in the editor with easy-to-use buttons
  • Non-intrusive Popup: Suggestions appear in a popup near your selection

Requirements

  • MediaWiki 1.42.0 or later
  • PHP 7.4 or later
  • Wanda extension (required dependency)
  • Vue.js (provided by MediaWiki)
  • Codex design system (provided by MediaWiki)

Installation

  1. Download or clone this extension to your MediaWiki extensions/ directory:
cd extensions
git clone https://github.com/naresh-kumar-babu/WandaScribe.git
  1. Make sure the Wanda extension is installed and configured properly

  2. Add the following to your LocalSettings.php:

wfLoadExtension( 'WandaScribe' );
  1. Navigate to Special:Version on your wiki to verify that the extension is successfully installed

Configuration

WandaScribe uses the Wanda extension's configuration. Make sure Wanda is properly configured with an LLM provider:

// Example Wanda configuration
$wgWandaLLMProvider = 'ollama'; // or 'openai', 'anthropic', 'azure', 'gemini'
$wgWandaLLMModel = 'gemma:2b';
$wgWandaLLMApiKey = 'your-api-key-here'; // if required by provider
$wgWandaLLMApiEndpoint = 'http://localhost:11434/api/';

For detailed Wanda configuration, see the Wanda extension documentation.

Usage

In the Wikitext Editor

  1. Navigate to any edit page on your wiki

  2. The WandaScribe assistance panel will appear above or near the editor

  3. Select text in the editor that you want to improve

  4. Click one of the assistance buttons:

    • Check Spelling: Identifies misspelled words and suggests corrections
    • Check Grammar: Finds grammatical errors and suggests fixes
    • Improve Text: Enhances clarity and engagement
    • Make Formal: Converts text to a formal tone
    • Make Casual: Converts text to a casual tone
    • Simplify: Makes text easier to understand
    • Expand: Adds more details and context
    • Summarize: Creates a concise summary
  5. A suggestion popup will appear showing:

    • The original text
    • The AI-generated suggestion
    • Options to Apply or Dismiss the suggestion
  6. Click Apply to replace the selected text with the suggestion

Real-time Spell Check

As you type, WandaScribe monitors your text and:

  • Detects potential misspellings when you press space or punctuation
  • Shows a popup with suggestions near the cursor
  • Allows you to quickly correct mistakes

Troubleshooting

Panel doesn't appear

  • Check that you're on an edit page (action=edit)
  • Verify Wanda extension is installed and loaded
  • Check browser console for JavaScript errors

"Wanda not available" error

  • Ensure Wanda extension is installed: Special:Version
  • Check Wanda configuration in LocalSettings.php
  • Verify LLM provider is properly configured

No suggestions or errors

  • Check Wanda's LLM configuration
  • Test Wanda's chat feature at Special:Wanda
  • Review MediaWiki debug logs

Slow performance

  • Adjust LLM timeout settings in Wanda config
  • Use a faster LLM model
  • Consider using a local Ollama instance

Privacy and Security

  • All text processing is done through the Wanda extension's LLM integration
  • Data is sent to the configured LLM provider (Ollama, OpenAI, etc.)
  • For sensitive wikis, use self-hosted Ollama to keep data private
  • No text is stored by WandaScribe itself

Limitations

  • Requires Wanda extension to be installed and configured
  • Performance depends on the LLM provider's speed
  • Quality of suggestions depends on the LLM model used

Support

See Also


About

Github mirror of "mediawiki/extensions/WandaScribe" - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing)

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •