pieces-app / pieces-os-client-sdk-for-python

The Pieces OS Client SDK is a powerful code engine package designed for writing applications on top of Pieces OS.
MIT License
26 stars 14 forks source link

Extend filetypes Pieces looks into for context #98

Open kristofmulier opened 1 week ago

kristofmulier commented 1 week ago

This is how I add additional paths to the Pieces Copilot:

import pieces_os_client
self.__pieces_client = pieces_os_client.wrapper.client.PiecesClient()
...
for p in additional_paths:
    if p not in self.__pieces_client.copilot.context.paths:
        self.__pieces_client.copilot.context.paths.append(p)
    continue

Pieces looks in these folders for content that can serve as context to the LLM. However, I learned from @mason-at-pieces that it skips certain filetypes that are of utmost importance to Embedded Developers. Please add the following filetypes:

ext_assembly = ['.s', '.S', '.asm']
ext_c = ['.c']
ext_h = ['.h']
ext_cpp = ['.c++', '.cc', '.cpp', '.cxx']
ext_hpp = ['.h++', '.hh', '.hpp', '.hxx', 'H']
ext_cmake = ['.cmake']
ext_linkerscript = ['.ld']
ext_make = ['.make', '.mk', '.mkf', 'makefile']