MCPcopy
hub / github.com/h2oai/wave / get_initial_completions

Function get_initial_completions

tools/vscode-extension/server/parser.py:143–157  ·  view source on GitHub ↗
(root: str)

Source from the content-addressed store, hash-verified

141
142
143def get_initial_completions(root: str) -> Dict[str, FileMetadata]:
144 store: Dict[str, FileMetadata] = {}
145 files_to_parse = get_files_to_parse(root, [])
146 FileMetadata.set_files_to_parse(files_to_parse)
147 for file in files_to_parse:
148 completion = fill_completion(read_file(file), metadata=store.get(file))
149 store[file] = completion
150 for dep in completion.deps:
151 if dep in store:
152 store[dep].deps.add(file)
153 else:
154 new_metadata = FileMetadata()
155 new_metadata.deps.add(file)
156 store[dep] = new_metadata
157 return store
158
159
160def get_completion_type(row: int, col: int, file_content: str) -> Optional[str]:

Callers 1

initFunction · 0.85

Calls 7

get_files_to_parseFunction · 0.85
fill_completionFunction · 0.85
FileMetadataClass · 0.85
set_files_to_parseMethod · 0.80
read_fileFunction · 0.70
getMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…