Gemini Codebase

Hi, I am looking to understand more the Gemini codebase indexing and awareness. I have enabled codebase indexing for the chat but when I chat with Gemini and ask a question like “Give me the function definition of foo” or “What is the first function in src/helper.mts?”, Gemini hallucinates. I’ve tried many different times and I’ve given it enough time to index. Does this functionality actually do anything? Is anyone able to actually get a correct response to this?

Additional info regarding Gemini integration:

When I try Gemini inline chat, I get “An error occurred – please try again later.” And when I try any options with Gemini dealing with the selected code, it always is an empty selection and subsequently (obviously) fails to be relevant because Gemini just hallucinates based on what it thinks the code might have been.

sounds like your behind a vpn or some other network restriction?
just curious, can you use gemini in here with same gmail account?

1 Like

Hi! Thanks for the report. To help debug:

  • Can you give a screenshot of the error with “An error occurred – please try again later.”
  • RE: indexing issue, is it possible for you share an example setup? For example - a github repo that I can checkout and ask the same question to reproduce the issue.
1 Like

Nope on the network restriction. I have used AI Studio extensively and am trying to get beyond a copy/paste work cycle. I’m over 1M+ tokens on one of those prompts. With the release of the ChatGPT o1 I was hoping that Gemini had something similar. When I found IDX I hoped that a tighter coupling vs vscode might help.

The one thing I haven’t tried yet is doing this in Chrome. I am currently in Vivaldi, which is based on Chromium.



I’ve uploaded screenshots of both selecting text and choosing Gemini > Explain Selected Code. I even tried disabling the vscodevim extension with no success (i.e. no change in behavior). Instead of copying the selected text, it copies "
" (looks to be a newline character only).

As far as a “Minimum Reproducible Example”, I would hate to think that is required for this case. I can tell you the particulars, and if there is some way to share the IDX workspace, I can do that with you. I don’t have current code on GitHub, GitLab, etc., because it is actually a protocol that reinvents distributed computation and one of the first use cases is version control. You can think of it as a generalized form of git’s design, but without arbitrary repo boundaries and not based on the file/folder paradigm. The most similar technology is probably IPFS + Ceramic, but they have made certain low-level design decisions that don’t leverage the potential of the approach, but I digress. In short, the technology can obviate (and disrupt) the existing gitops workflow, which has acquired over two decades of technical debt and no one seems to be asking why we haven’t had a new version control system since 2005.

Anyway, the things that make this an interesting workspace is that it is monorepo-like and contains multiple libs and apps…but not that many. The last estimate I had on LOC was upwards of 50k? But there are all of the node_modules folders, though I don’t use anything other than “@types/node” (to keep the dependency tree small at this low of a level). Perhaps there is a size limit on the workspace, or less likely, assumptions on expected folder structures? Is there a setting in the dev.nix to exclude certain files/folders by glob or regexp?

Another point is that I have tried it both in Chrome and Vivaldi and the same behavior occurs. When I go to the settings of the Gemini page, I have checked the IDX: AI codebase indexing and inline completion under all three tabs (user, remote, and workspace).

Ah the other point that might be relevant is that I used the drag + drop feature to upload the files/folders.

I’ve done some more testing:

  • a new workspace…
    • new file created within IDX works (copies the text correctly in the Gemini panel)
    • file uploaded from my machine works
  • in my real workspace
    • /.idx
      • /dev.nix works
      • /test.mts works
    • /apps
      • /test.mts works
      • /test
        • /test.mts works
      • /ante-gib
        • /test.mts does not work

The same goes for other apps/[app folder] and libs/[lib folder] files, where inside apps itself, a new folder (created in IDX) will work correctly. But a new file or folder inside one of those actual app/lib folders (which were added via drag and drop) will fail. When I created the workspace, I manually created the libs and apps folders. So it looks like it has something to do with drag and drop a folder with multiple files underneath.

I compared the permissions but all the folders are drwxr-xr-x and all the files are -rw-r--r--.

Lets try to confirm the indexer is active. Can you open a terminal and run

curl -H 'Content-Type: application/json' \
      -X POST \
      localhost:9401/indexers

This should give you a list of directories. I’d expect a single directory to be returned. Use that value to run

curl -H 'Content-Type: application/json' \
      -d '{ "root":"<DIRECTORY>"}' \
      -X POST \
      localhost:9401/indexed-files

To see a list of indexed files. Is it missing a large part of your code base? Does it contain the new files you created inside of IDX?

Something else to try is restarting the indexer.

curl -H 'Content-Type: application/json' \
      -d '{ "delete": true }' \
      -X POST \
      localhost:9401/indexers/stop-all

curl -H 'Content-Type: application/json' \
      -d '{ "root":"<DIRECTORY>"}' \
      -X POST \
      localhost:9401/indexers/start

Does this fix the issue?

Hi @jamalc thanks for your response,

I followed your steps through listing the indexed files (as of me typing this), and YES! – It only lists a few files, and those files include the newly added files but not the bulk of the files and folders of my codebase.

I am now going to try restarting the indexer…

I got a result of ‘{“status”:“ok”}’ for both stopping the indexer and (EDIT: starting it again), but when I list the files again it looks to be exactly the same incomplete (very small) subset of files. I checked again the actual select text > Gemini > Explain Selected Code and it is still an empty selection (it still doesn’t work).

I also just tried to stop the service and get a list of indexed files, which returned an empty files array as expected. I then posted the start message and immediately checked for indexed files, which was still empty. But a second or two later it was filled again with that small subset as before. So the commands seem to have been entered and working as expected, but the indexing step is still missing the other folders.

Thanks, @ibgib. A few other things to check:

  • What do your .gitignore(s) look like? Note that gitignore’d files are NOT indexed.

  • Just to confirm - you don’t have any .aiexclude files right?

  • What do you see when you run cat ~/.monospace-ai-index/*/manifest.json - and how many files are there (you can pipe to wc - cat … | wc to see the count)

Are you open to temporarily sharing the workspace? You can run the IDX: Share Workspace command to share.

Screenshot 2024-09-26 at 11.25.59 AM

1 Like
  • There are multiple .gitignore files still, but nothing to exclude src files obviously.
  • No .aiexclude files
  • output:
{
  "README.md": "84cb9ff1ac114215e3e68748f25c59ed148d1563",
  "package.json": "f77f88f66bc8ba4d43f36fcb076d3bb5af510a6f",
  "tsconfig.base.json": "21e1cd92c3dc19d7460b7079fe966185cc4788d5",
  ".idx/dev.nix": "1e0e4d1fb65a27ed8e25f410c58f74aaf5073409",
  ".idx/notes on idx.md": "e8b3cb3ed26f1a8f2a77108a100fa0bd376c7ae2",
  ".vscode/settings.json": "57c03df693937a95731c0ec779c4f93569cea1e4",
  "apps/test.mts": "18399bfcf06aea3cf9b541d0c65eec6af1f304e8",
  "libs/README.md": "52dbc41106f9070d17927e8ca7bcad6ff23fb4d2",
  "apps/test/test.mts": "18399bfcf06aea3cf9b541d0c65eec6af1f304e8",
  "libs/test/test.mts": "18399bfcf06aea3cf9b541d0c65eec6af1f304e8"
}
  • piped with wc: 11 (if that’s necessary, anyway the result is size 10)

And you’d do me great honor if you looked at the workspace :raised_hands:. I have shared it with you. I have not made any changes since uploading the workspace (other than adding those test files) so there is no danger in breaking anything that can’t be fixed. I assume testing the Gemini > Explain Selected Code testing for you will be obvious, but I’d suggest (out of pure self-interest of course!) that to test indexing on the entire codebase (if that indeed turns out to be possible) that you ask Gemini to explain details like:

  • unique content addressing (the ib^gib schema which provides the Merkle-link-like functionality for DLT is actually composed of a per-use-case ib + a punctiliar hash gib + optional “temporal junction point” hash which is like a pointer to the first record in a timeline, which acts similarly to a stream id of sorts, but in a monotonically increasing hypergraph). In the past attempts I’ve had with communicating with Gemini, it often ignores this schema and often thinks in terms of a simple hash as the content addressing mechanism like most DLTs - though to Gemini’s credit, one prompt in ai studio, where I copy/pasted just about the entire codebase was able to not only see this unique schema, but was able to glean downstream nuances that I was extremely (pleasantly!) surprised to read. Now if only I could get investors to use their own darn models to do the same thing…But I digress.
  • how the transform mechanism works, inspired by an event-sourcing model, but that adds the transforms to the graph itself, enabling the incredibly amazing ability to have data and derivative data alongside metadata across multiple scopes - all in the same hypergraph. This adds initial complexity but extremely simplifies inevitable downstream complexity in the long run…but don’t take my word for it, ask Gemini!

Anyway, that’s probably enough for testing and I don’t want to spam too much here. Feel free to probe the codebase as you wish…you’d be the first human besides myself to do so! Thanks for all your help.

When I try to use the inline chat I get a message telling me files are being ignored by AI exclude. Curious, did you at any point have a .aiexclude file in the project?

Screenshot 2024-09-26 at 4.11.43 PM

Hi @jamalc , thanks for your continued eyeballs on this.

As to the .aiexclude file, no, not that I know of. I did not explicitly (manually) create one.

Since I’ve only just begun using IDX I can describe what I have done up to this point.

  • New workspace using Blank Template
    • the only settings I recall changing pertain to trying to turn on AI indexing (gemini chat tab gear clicked) and vscodevim (via dev.nix)
  • Created top level folders to recreate my relatively small monorepo structure
  • Tried uploading multiple files/folders but failed until I posted here on the forums where someone kindly pointed me to the drag and drop (I would have expected a context-click menu upload option to accept folders)
  • Did some initial troubleshooting in trying to get a web preview up and going, to which end I did the following to the best of my memory
    • I fiddled with the dev.nix file a bit, using Gemini Chat to help troubleshoot the issue.
      • Apparently there is only one preview available at the moment - it’s not an array or something AFAICT? - so you can see my solution setting the command and cwd settings. To the best of my knowledge, I didn’t do anything else there, especially pertaining an .aiexclude file.
      • Installed http-server globally after initially failed with npx http-server attempts in dev.nix, but I do not think I ever changed dev.nix to always install this globally.
    • Executed npm install in multiple libs/apps, which only install my own libs/apps - with the exception of @types/node (one of the apps may still have had references to jasmine and some of its dependencies, but I had a bit of a falling out with that maintainer so removed that one! :grimacing:)
      • I mention the few dependencies to point out that there shouldn’t be other questionable packages changing the global environment.
    • Executed npm build scripts, which builds dist folders, eventually successfully with a web preview.
  • Added the test files/folders mentioned in this thread, as well as executed the test commands.

So I’ve done relatively little. I don’t recall the particulars of some of the initial dialog(s) when creating the workspace. Is there some workflow that generates the .aiexclude file(s) automagically?

In another thread (EDIT: before I posted this question here, not trying to double y’alls workload), I had asked the OP if they had success with their issues with Gemini integration.

@kirupa asked me there (and I am reposting here):

When I choose Gemini > Explain Selected Code, after clearing errors, there are no new errors generated in the fail case (when the selected code is blank).

You didn’t ask directly, but after temporarily disabling web previews (to cut down on dev console errors), I did get 4 errors when the workspace loads:

loader.js:3 
        
        
       GET https://idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda.js net::ERR_ABORTED 404 (Not Found)
load @ loader.js:3
load @ loader.js:3
o @ loader.js:5
_loadModule @ loader.js:5
_resolve @ loader.js:6
defineModule @ loader.js:5
_relativeRequire @ loader.js:5
e @ loader.js:5
(anonymous) @ workbench.web.main.js:688
j @ workbench.web.main.js:688
S.C.<computed> @ workbench.web.main.js:7
c @ workbench.web.main.js:688
createNewMessage @ workbench.web.main.js:688
g @ workbench.web.main.js:685
await in g
l @ workbench.web.main.js:685
c @ workbench.web.main.js:685
(anonymous) @ workbench.web.main.js:685
P @ workbench.web.main.js:685
await in P
D @ workbench.web.main.js:685
u @ workbench.web.main.js:2058
t @ workbench.web.main.js:2058
getChannel @ workbench.web.main.js:2058
withChannel @ workbench.web.main.js:2058
m @ workbench.web.main.js:2058
getRawEnvironment @ workbench.web.main.js:2058
(anonymous) @ workbench.web.main.js:1731
register @ workbench.web.main.js:1731
j @ workbench.web.main.js:2409
await in j
open @ workbench.web.main.js:2409
p @ workbench.web.main.js:2409
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
_invokeFactory @ loader.js:5
complete @ loader.js:5
_onModuleComplete @ loader.js:6
_resolve @ loader.js:6
defineModule @ loader.js:5
_ @ loader.js:6
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda.js:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)
workbench.web.main.js:689 
        
        
       GET https://idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda_bg.wasm 404 (Not Found)
k @ workbench.web.main.js:689
j @ workbench.web.main.js:688
S.C.<computed> @ workbench.web.main.js:7
c @ workbench.web.main.js:688
createNewMessage @ workbench.web.main.js:688
g @ workbench.web.main.js:685
await in g
l @ workbench.web.main.js:685
c @ workbench.web.main.js:685
(anonymous) @ workbench.web.main.js:685
P @ workbench.web.main.js:685
await in P
D @ workbench.web.main.js:685
u @ workbench.web.main.js:2058
t @ workbench.web.main.js:2058
getChannel @ workbench.web.main.js:2058
withChannel @ workbench.web.main.js:2058
m @ workbench.web.main.js:2058
getRawEnvironment @ workbench.web.main.js:2058
(anonymous) @ workbench.web.main.js:1731
register @ workbench.web.main.js:1731
j @ workbench.web.main.js:2409
await in j
open @ workbench.web.main.js:2409
p @ workbench.web.main.js:2409
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
_invokeFactory @ loader.js:5
complete @ loader.js:5
_onModuleComplete @ loader.js:6
_resolve @ loader.js:6
defineModule @ loader.js:5
_ @ loader.js:6
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
vsda_bg.wasm:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)
loader.js:3 
        
        
       GET https://idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda.js net::ERR_ABORTED 404 (Not Found)
load @ loader.js:3
load @ loader.js:3
o @ loader.js:5
_loadModule @ loader.js:5
_resolve @ loader.js:6
defineModule @ loader.js:5
_relativeRequire @ loader.js:5
e @ loader.js:5
(anonymous) @ workbench.web.main.js:688
j @ workbench.web.main.js:688
S.C.<computed> @ workbench.web.main.js:7
c @ workbench.web.main.js:688
createNewMessage @ workbench.web.main.js:688
g @ workbench.web.main.js:685
await in g
l @ workbench.web.main.js:685
c @ workbench.web.main.js:685
(anonymous) @ workbench.web.main.js:685
P @ workbench.web.main.js:685
await in P
D @ workbench.web.main.js:685
u @ workbench.web.main.js:2058
t @ workbench.web.main.js:2058
getChannel @ workbench.web.main.js:2058
withChannel @ workbench.web.main.js:2058
m @ workbench.web.main.js:2058
getRawEnvironment @ workbench.web.main.js:2058
(anonymous) @ workbench.web.main.js:1731
register @ workbench.web.main.js:1731
j @ workbench.web.main.js:2409
await in j
open @ workbench.web.main.js:2409
p @ workbench.web.main.js:2409
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
_invokeFactory @ loader.js:5
complete @ loader.js:5
_onModuleComplete @ loader.js:6
_resolve @ loader.js:6
defineModule @ loader.js:5
_ @ loader.js:6
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda.js:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)
workbench.web.main.js:689 
        
        
       GET https://idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda_bg.wasm 404 (Not Found)
k @ workbench.web.main.js:689
j @ workbench.web.main.js:688
S.C.<computed> @ workbench.web.main.js:7
c @ workbench.web.main.js:688
createNewMessage @ workbench.web.main.js:688
g @ workbench.web.main.js:685
await in g
l @ workbench.web.main.js:685
c @ workbench.web.main.js:685
(anonymous) @ workbench.web.main.js:685
P @ workbench.web.main.js:685
await in P
D @ workbench.web.main.js:685
u @ workbench.web.main.js:2058
t @ workbench.web.main.js:2058
getChannel @ workbench.web.main.js:2058
withChannel @ workbench.web.main.js:2058
m @ workbench.web.main.js:2058
getRawEnvironment @ workbench.web.main.js:2058
(anonymous) @ workbench.web.main.js:1731
register @ workbench.web.main.js:1731
j @ workbench.web.main.js:2409
await in j
open @ workbench.web.main.js:2409
p @ workbench.web.main.js:2409
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
_invokeFactory @ loader.js:5
complete @ loader.js:5
_onModuleComplete @ loader.js:6
_resolve @ loader.js:6
defineModule @ loader.js:5
_ @ loader.js:6
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
vsda_bg.wasm:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)
loader.js:3 
        
        
       GET https://idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda.js net::ERR_ABORTED 404 (Not Found)
load @ loader.js:3
load @ loader.js:3
o @ loader.js:5
_loadModule @ loader.js:5
_resolve @ loader.js:6
defineModule @ loader.js:5
_relativeRequire @ loader.js:5
e @ loader.js:5
(anonymous) @ workbench.web.main.js:688
j @ workbench.web.main.js:688
S.C.<computed> @ workbench.web.main.js:7
c @ workbench.web.main.js:688
createNewMessage @ workbench.web.main.js:688
g @ workbench.web.main.js:685
await in g
l @ workbench.web.main.js:685
c @ workbench.web.main.js:685
(anonymous) @ workbench.web.main.js:685
P @ workbench.web.main.js:685
await in P
D @ workbench.web.main.js:685
u @ workbench.web.main.js:2058
t @ workbench.web.main.js:2058
getChannel @ workbench.web.main.js:2058
withChannel @ workbench.web.main.js:2058
m @ workbench.web.main.js:2058
getRawEnvironment @ workbench.web.main.js:2058
(anonymous) @ workbench.web.main.js:1731
register @ workbench.web.main.js:1731
j @ workbench.web.main.js:2409
await in j
open @ workbench.web.main.js:2409
p @ workbench.web.main.js:2409
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
_invokeFactory @ loader.js:5
complete @ loader.js:5
_onModuleComplete @ loader.js:6
_resolve @ loader.js:6
defineModule @ loader.js:5
_ @ loader.js:6
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda.js:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)
workbench.web.main.js:689 
        
        
       GET https://idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda_bg.wasm 404 (Not Found)
k @ workbench.web.main.js:689
j @ workbench.web.main.js:688
S.C.<computed> @ workbench.web.main.js:7
c @ workbench.web.main.js:688
createNewMessage @ workbench.web.main.js:688
g @ workbench.web.main.js:685
await in g
l @ workbench.web.main.js:685
c @ workbench.web.main.js:685
(anonymous) @ workbench.web.main.js:685
P @ workbench.web.main.js:685
await in P
D @ workbench.web.main.js:685
u @ workbench.web.main.js:2058
t @ workbench.web.main.js:2058
getChannel @ workbench.web.main.js:2058
withChannel @ workbench.web.main.js:2058
m @ workbench.web.main.js:2058
getRawEnvironment @ workbench.web.main.js:2058
(anonymous) @ workbench.web.main.js:1731
register @ workbench.web.main.js:1731
j @ workbench.web.main.js:2409
await in j
open @ workbench.web.main.js:2409
p @ workbench.web.main.js:2409
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
_invokeFactory @ loader.js:5
complete @ loader.js:5
_onModuleComplete @ loader.js:6
_resolve @ loader.js:6
defineModule @ loader.js:5
_ @ loader.js:6
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
vsda_bg.wasm:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)
loader.js:3 
        
        
       GET https://idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda.js net::ERR_ABORTED 404 (Not Found)
load @ loader.js:3
load @ loader.js:3
o @ loader.js:5
_loadModule @ loader.js:5
_resolve @ loader.js:6
defineModule @ loader.js:5
_relativeRequire @ loader.js:5
e @ loader.js:5
(anonymous) @ workbench.web.main.js:688
j @ workbench.web.main.js:688
S.C.<computed> @ workbench.web.main.js:7
c @ workbench.web.main.js:688
createNewMessage @ workbench.web.main.js:688
g @ workbench.web.main.js:685
await in g
l @ workbench.web.main.js:685
c @ workbench.web.main.js:685
(anonymous) @ workbench.web.main.js:685
P @ workbench.web.main.js:685
await in P
D @ workbench.web.main.js:685
u @ workbench.web.main.js:2058
t @ workbench.web.main.js:2058
getChannel @ workbench.web.main.js:2058
withChannel @ workbench.web.main.js:2058
m @ workbench.web.main.js:2058
getRawEnvironment @ workbench.web.main.js:2058
(anonymous) @ workbench.web.main.js:1731
register @ workbench.web.main.js:1731
j @ workbench.web.main.js:2409
await in j
open @ workbench.web.main.js:2409
p @ workbench.web.main.js:2409
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
_invokeFactory @ loader.js:5
complete @ loader.js:5
_onModuleComplete @ loader.js:6
_resolve @ loader.js:6
defineModule @ loader.js:5
_ @ loader.js:6
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda.js:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)
workbench.web.main.js:689 
        
        
       GET https://idx-ibgib-on-idx-1726786477281.cluster-vyr53kd25jc2yvngldrwyq6zc4.cloudworkstations.dev/oss-cf213cd39a3bfb26ce45d2c85949fee44b9d03d9/static/out/vsda_bg.wasm 404 (Not Found)
k @ workbench.web.main.js:689
j @ workbench.web.main.js:688
S.C.<computed> @ workbench.web.main.js:7
c @ workbench.web.main.js:688
createNewMessage @ workbench.web.main.js:688
g @ workbench.web.main.js:685
await in g
l @ workbench.web.main.js:685
c @ workbench.web.main.js:685
(anonymous) @ workbench.web.main.js:685
P @ workbench.web.main.js:685
await in P
D @ workbench.web.main.js:685
u @ workbench.web.main.js:2058
t @ workbench.web.main.js:2058
getChannel @ workbench.web.main.js:2058
withChannel @ workbench.web.main.js:2058
m @ workbench.web.main.js:2058
getRawEnvironment @ workbench.web.main.js:2058
(anonymous) @ workbench.web.main.js:1731
register @ workbench.web.main.js:1731
j @ workbench.web.main.js:2409
await in j
open @ workbench.web.main.js:2409
p @ workbench.web.main.js:2409
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
_invokeFactory @ loader.js:5
complete @ loader.js:5
_onModuleComplete @ loader.js:6
_resolve @ loader.js:6
defineModule @ loader.js:5
_ @ loader.js:6
(anonymous) @ workbench.js:3
(anonymous) @ workbench.js:3
vsda_bg.wasm:1 
        
        
       Failed to load resource: the server responded with a status of 404 (Not Found)

Took another look at your .gitignore file. The files missing from the index are matched by items under the # apps/libraries are in their own repositories heading. Files matched here are excluded from AI features so you won’t see autocomplete or code generation working in these directories.

1 Like

Well a big Thank You @jamalc for double-checking my codeblind dismissal of the .gitignore file suggestion. I should have thought more deeply on that question of yours or at least double-checked myself. That has been a long ago hack from git’s shortcomings, not to blame them per se but just sayin’!

Awesome work @jamalc ! I’m away right now but I’ll check this evening. If that is the solution (and i think it is of course), is there official documentation (how-to or troubleshooting faq) that I missed that we might want to change? Of course this thread will also act as documentation as well at the very least :roll_eyes:

I just looked and indeed we do NOT mention gitignore is honored here:

We’ll update shortly. We may also need to mention this in other places in the docs too.

1 Like

I did skim that documentation at the start of my IDX journey, but I had filed it as not applicable to me (yet). Little did I know at the time! I will edit my original question to point to the .aiexclude documentation for future users, by which time I’m sure you’ll have the .gitignore info there as well.

I also remember reading in the FAQ about avoiding using code as training data here. Personally when I was looking through the FAQ/googling for codebase indexing-related information I came across this. A note here might be useful since it is a very closely related issue, for people like myself who ultimately should be directed to the .aiexclude documentation.

1 Like

OK, I edited the .gitignore (I hope to one day delete it) in the root of the workspace which did indeed affect the curl call to the indexed files. It still was not working with Explain Selected Code, so I stopped the service with the delete flag and restarted it. The indexed files curl command still returns an empty array until the indexing finished 100%, but now it shows 56K worth of text for the files.

As hoped for (and expected?), the Explain Selected Code is now working, which is interesting since from my POV I thought it would be driven by the browser selected text (so counter-intuitive for me). The general codebase chat is another issue that I’m going to have to explore further to grok.

Thank you @jamalc and IDX team for your competent, polite and ultimately effective responsiveness on this! IMO it reflects greatly on you and your work.

1 Like