Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 12, 2025

Created comprehensive documentation in INJECTED_LIBRARIES.md covering all SDK patterns, injected libraries, and helper functions for AI code generation.

Changes

Core SDK Fixes

  • FDOInterface: Removed incorrect parameter from init() signature (was init(sdk: FDO_SDK), now init())

Documentation Enhancements (441→776 lines)

SDK Core Patterns

  • Complete plugin structure template with all required components
  • Handler registration patterns (correct vs incorrect examples)
  • Storage operations using StoreType interface
  • DOM helper usage for all classes (Table, Text, Button, Input, Link, Media, Semantic, Nested, Misc)
  • Mixins implementation (QuickAction, SidePanel)
  • Error handling with decorators
  • 10 common patterns summary

Injected Libraries

  • Enhanced window helper documentation with TypeScript signatures
  • Communication patterns (backend ↔ frontend)
  • CSS frameworks: Pure CSS, Highlight.js, Notyf
  • JS libraries: FontAwesome, Split Grid, ACE Editor, Goober
  • Complete usage examples for each library

AI-Specific Context

  • Usage context (no imports needed, browser environment)
  • TypeScript configuration guide
  • Best practices and common pitfalls

Example

Before: Examples showed incorrect interface implementation

export interface FDOInterface {
    init(sdk: FDO_SDK): void;  // ❌ Wrong
    render(): string;
}

After: Correct pattern with comprehensive documentation

export interface FDOInterface {
    init(): void;  // ✓ Correct
    render(): string;
}

// Full plugin template now available in docs
export default class MyPlugin extends FDO_SDK implements FDOInterface {
    init(): void {
        PluginRegistry.registerHandler('action', async (data) => {
            return { success: true, data };
        });
    }
}
Original prompt

Create a comprehensive information about SDK usage ready for usage in AI including injected libraries at INJECTED_LIBRARIES.md


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits November 12, 2025 14:55
Co-authored-by: anikitenko <12380460+anikitenko@users.noreply.github.com>
Co-authored-by: anikitenko <12380460+anikitenko@users.noreply.github.com>
Co-authored-by: anikitenko <12380460+anikitenko@users.noreply.github.com>
Copilot AI changed the title [WIP] Add comprehensive SDK usage documentation with injected libraries Add comprehensive AI-ready SDK usage documentation Nov 12, 2025
Copilot AI requested a review from anikitenko November 12, 2025 15:07
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.

2 participants