MCPcopy
hub / github.com/Textualize/textual / get_suggestion

Method get_suggestion

src/textual/suggester.py:76–93  ·  view source on GitHub ↗

Try to get a completion suggestion for the given input value. Custom suggesters should implement this method. Note: The value argument will be casefolded if `self.case_sensitive` is `False`. Note: If your implementation is not deterministic, you may

(self, value: str)

Source from the content-addressed store, hash-verified

74
75 @abstractmethod
76 async def get_suggestion(self, value: str) -> str | None:
77 """Try to get a completion suggestion for the given input value.
78
79 Custom suggesters should implement this method.
80
81 Note:
82 The value argument will be casefolded if `self.case_sensitive` is `False`.
83
84 Note:
85 If your implementation is not deterministic, you may need to disable caching.
86
87 Args:
88 value: The current value of the requester widget.
89
90 Returns:
91 A valid suggestion or `None`.
92 """
93 pass
94
95
96class SuggestFromList(Suggester):

Callers 1

_get_suggestionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected