continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
15.8k stars 1.2k forks source link

A way to manually add additional URLs to a @Docs context #2072

Open TiagoTiago opened 3 weeks ago

TiagoTiago commented 3 weeks ago

Validations

Problem

I thought of adding the modding API doc of a game as a documentation context to help me figure out if I could do the kinda of mod I was thinking of for this game, but turns out while it does seems to have all commands listed on the site, the more natural language tutorials and examples are not linked anywhere in there, and are instead placed as guides on Steam, each on their own page.

Solution

I would like to be able to take the existing AT-Docs context provider and manually append specific URLs and files to it that were not in the original crawl path, to blend it all into a single context provider instead of having to write several providers in a row whenever I wanna give the AI the complete picture.

TiagoTiago commented 3 weeks ago

Looking at https://docs.continue.dev/customization/context-providers#documentation the format there seemed to differ slightly from what the autogenerated format in the json looks like; which gave me hope that there could be a way to make it work, but no, it just kills that keyword (I imagine there's a chance maybe I misinterpreted it), but perhaps the idea that doesn't work now could serve as inspiration for a format that would work in the future.

The auto-generated format is:

    "docs": [
        {
            "startUrl": "https://example.com",
            "roottUrl": "https://example.com",
            "title": "ExampleTitle",
            "maxDepth": 3
            "faviconUrl": "https://example.com/favicon.ico"
        }
    ]

Meanwhile the inspiration I got looking at the docs was

"docs": [
        {
            "name": "ExampleWithMultipleSources",
            "params": {
                "sites": [
                    {
                        "title": "APIdocs",
                        "startUrl": "https://example.com/",
                        "rootUrl": "https://example.com/",
                        "maxDepth": 3,
                        "faviconUrl": "https://example.com/favicon.ico"
                    },
                    {
                        "title": "GUITutorial",
                        "startUrl": "https://example.net/tutorials/GUITutorial",
                        "rootUrl": "https://example.net/tutorials/GUITutorial",
                        "maxDepth": 0,
                        "faviconUrl": "https://www.example.com/favicon.ico"
                    },
                    // [...]
                    {
                        "title": "SavingAndRestoringStatesTutorial",
                        "startUrl": "https://example.net/tutorials/SaveandRestoreTutorial",
                        "rootUrl": "https://example.net/tutorials/SaveandRestoreTutorial",
                        "maxDepth": 0,
                        "faviconUrl": "https://www.example.com/favicon.ico"
                    }
                ]
            }

        }
    ]
Patrick-Erichsen commented 3 weeks ago

Hi @TiagoTiago , the docs you referenced are slightly out of date. The new docs haven't been merged into main yet but you can view them on dev here: https://github.com/continuedev/continue/blob/dev/docs/docs/features/talk-to-your-docs.md

TiagoTiago commented 3 weeks ago

Hi @TiagoTiago , the docs you referenced are slightly out of date. The new docs haven't been merged into main yet but you can view them on dev here: https://github.com/continuedev/continue/blob/dev/docs/docs/features/talk-to-your-docs.md

So that's why the formats are different, I see. But for now still no way to blend multiple sources in the same keyword, right?