Loading the documentation…
When DataMind Oda needs a file on your computer, or a piece of text inside one, it searches for it. A file search matches files by their name; a content search matches text inside files. This page covers what each search accepts and how precise it can be. For reading a single file, see Read, write and edit files; for the chat side of a search, see Read a search step in the chat.
Both searches run in the folder Oda works in for the chat. Name another folder in your request and the search runs there instead; a relative name is read from the folder Oda works in.
Oda matches each file's name against a pattern, so a search can be as wide or as narrow as you need:
*. ts finds that kind of file everywhere below the folder being searched, however deep it sits.Glob *. md in docs.No files found.Oda works through the files below the folder to find a piece of text:
*. ts for one kind or *. {js,jsx} for two kinds in a single pattern. A filter must be one positive pattern: a filter that starts with !, or that lists patterns separated by commas, is refused.No matches found.(line is not valid UTF-8).Grep todo in src (*. ts).A content search shows as a step titled Grep, a file-name search as a step titled Glob (Oda's steps in chat covers step rows in general). While the search runs, the step shows only the pattern; the card appears when the search finishes.
12: const foo = 1. Click a file's header to fold its lines away, and again to bring them back.3 matches · 2 files or 2 paths. When the search found more than the card holds, it reads Showing 3 of 42 matches · 2 files or Showing 2 of 40 paths, and the line below the card names where the complete result is stored.… N more lines reveals the rest. A search that matched nothing reads No results.A failed search turns its step into the error state. The collapsed step shows the first line of the problem, for example grep: invalid regular expression when the pattern was not valid; expanded, the same text appears in the OUT section while the first line stays as the summary. If the failure carries no text of its own, the step shows the error's name and code, for example ToolError: timeout. Nothing is changed by a failed search: ask again in your own words, naming the folder or describing the text more precisely.
. git, . svn, . hg, . bzr, . jj and . sl. This holds even when a search points straight at one of those folders.A search answers with one bounded result, so its size stays predictable:
Full sorted result stored at: <locator>. Use read with offset/ limit, or grep this path to search within it. A content search says Full grep result stored at: instead, and its header counts what it keeps against the full total, as in Found <kept> of <seen> matches.sampled across <n> of the <m> top-level entries this pattern matched instead of taken in modification-time order.The complete result could not be saved; narrow pattern, path, or include to see more. For a file search, the note suggests a narrower pattern or path instead.The saved file is named glob-results. for a file search and grep-results. for a content search; where these files live and when they are cleared up is covered in Large results and spill files.
In the chat's workspace, the folder Oda works in for that chat (Workspaces, files and permissions). Name another folder in your request and the search runs there instead; a relative name is read from the workspace.
Yes. A pattern with no folder separator matches a file's name at any depth, so the search reaches every folder below the one it runs in. To keep a search in one folder, name that folder or include it in the pattern.
Yes. A file whose name begins with a dot, or that an ignore list would normally hide, is searched like any other file; only the version-control folders stay out.
. git?Folders like . hold a version-control tool's own data, not your work, so no search enters them: ., ., ., ., . and . are excluded even when a search points straight at one of them. Files next to them are searched as usual.
Yes. Ask for the kind of file you mean, and Oda adds one name filter to the search, for example *. for one kind or *. for two kinds in a single pattern. A filter must be one positive pattern; one that starts with !, or that lists patterns separated by commas, is refused.
The header counts what the card holds: the matches and the files they sit in for a content search (3 matches · 2 files), or the paths for a file-name search (2 paths). When the search found more, the count adds the full total: Showing 3 of 42 matches · 2 files.
Nothing was changed by the failed search. The step shows the first line of the problem, for example grep: invalid regular expression when the pattern was not valid; ask again in your own words and Oda can search again.
Yes. Copy in the card's header copies everything the card holds as plain text: for a content search every file with its matches and line numbers, for a file-name search the path list.
A file search keeps up to 100 paths in its result, and a content search up to 250 matches; a matched line longer than 2,000 characters is cut and marked. Anything beyond that is in the complete result Oda saves and names in the note on the result.
A search is stopped if it runs for more than about 30 seconds, or if it produces more output than one result can carry (about 20 MB). Ask again with a narrower pattern, folder or filter and Oda runs a smaller search.
(line is not valid UTF-8) mean?That match sits in a line that is not plain text, so Oda cannot show the line and writes this note in its place. The match is still reported, under its file and line number.
No. A search runs inside its step and returns there; nothing keeps working afterwards. There is no second page either: what did not fit is in the saved complete result.