Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The /onboard command yields poor results with granite3-dense:8b #174

Open
fbricon opened this issue Dec 10, 2024 · 2 comments
Open

The /onboard command yields poor results with granite3-dense:8b #174

fbricon opened this issue Dec 10, 2024 · 2 comments

Comments

@fbricon
Copy link
Collaborator

fbricon commented Dec 10, 2024

If you enable the /onboard slash command in ~/.continue/config.json,

 "slashCommands": [
	{
		"name": "onboard",
		"description": "Generates a description of the current project"
	},
      ...
 ],

and then run it with granite3-dense:8b against the LemMinX repository (an Java-based XML Language server), the results are pretty underwhelming and the summary as generic as possible:

Based on the provided XML file, it seems to be a Maven project configuration file for an Eclipse plugin development project. Here are the most important folders and their roles:

1. **/src/main/resources**: This folder contains the main source code for the plugin. It includes Java classes, XML files, and other resources used by the plugin.
2. **/src/test/resources**: This folder contains test resources for the plugin. It includes test cases, test data, and other resources used for testing the plugin.
3. **/target**: This folder is generated during the build process and contains the compiled and packaged plugin. It includes the plugin's JAR file, metadata files, and other build artifacts.
4. **/pom.xml**: This is the main Maven project configuration file. It defines the project's dependencies, build settings, and other properties.
5. **/plugin.xml**: This is the Eclipse plugin manifest file. It defines the plugin's ID, version, provider, and other metadata used by Eclipse.
6. **/build.xml**: This is an Ant build script for building the plugin using Maven. It defines the build settings, dependencies, and goals used by Maven.
7. **/profiles**: This folder contains Maven profiles that define additional build settings and dependencies for specific build stages or environments.
8. **/license-tool-plugin**: This is a custom Maven plugin for checking license compliance in the project. It includes the plugin's source code, configuration files, and other resources.
9. **/eclipse-4.10**: This folder contains the Eclipse 4.10 update site repository used by the plugin. It includes the plugin's dependencies, features, and other resources.
10. **/org.eclipse.equinox.p2.publisher.eclipse**: This is a dependency required by the plugin for publishing its metadata and artifacts to an Eclipse P2 repository.

Based on the folder structure and dependencies, here are some high-level insights about the project's architecture:

1. The project follows a modular architecture with separate folders for source code, test resources, build artifacts, and configuration files.
2. The project uses Maven as its build tool and follows the standard Maven project layout.
3. The project includes custom Maven plugins and profiles for building and testing the plugin.
4. The project uses Eclipse P2 for publishing its metadata and artifacts to an Eclipse repository.
5. The project includes a custom license compliance plugin for checking license compliance in the project.

Here are some additional insights about the project's architecture:

1. The project uses a monorepo structure, with all the project's code and resources stored in a single repository.
2. The project uses TypeScript for type checking and has a separate folder for TypeScript source code.
3. The project includes a separate folder for Eclipse features and plugins used by the plugin.
4. The project includes a separate folder for Eclipse update site repositories used by the plugin.
5. The project includes a separate folder for custom Maven plugins and profiles used by the project.

Code for the onboard slash command is available at: https://github.com/continuedev/continue/blob/main/core/commands/slash/onboard.ts#L158

The prompt might be a improved.

@fbricon
Copy link
Collaborator Author

fbricon commented Dec 10, 2024

Looks like the limited context length is truncating the available context (partial pom.xml, no README.md). Here's the prompt visible in Continue's output view:

<system>
You are Granite, an AI language model developed by IBM. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior.

<user>
						<version>1.3.0</version>
							<executions>
								<execution>
									<id>generate-p2-site</id>
									<phase>package</phase>
									<goals>
										<goal>eclipse-run</goal>
									</goals>
									<configuration>
										<executionEnvironment>JavaSE-1.8</executionEnvironment>
										<repositories>
											<repository>
												<id>eclipse-4.10</id>
												<layout>p2</layout>
												<url>http://download.eclipse.org/eclipse/updates/4.10/R-4.10-201812060815/</url>
											</repository>
										</repositories>
										<dependencies>
											<dependency>
												<artifactId>org.eclipse.equinox.p2.publisher.eclipse</artifactId>
												<type>eclipse-plugin</type>
											</dependency>
											<dependency>
												<artifactId>org.eclipse.equinox.p2.core.feature</artifactId>
												<type>eclipse-feature</type>
											</dependency>
											<dependency>
												<artifactId>org.eclipse.equinox.core.feature</artifactId>
												<type>eclipse-feature</type>
											</dependency>
										</dependencies>
										<applicationsArgs>
											<arg>-application</arg>
											<arg>org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher</arg>
											<arg>-metadataRepository</arg>
											<arg>file:${project.build.directory}/p2</arg>
											<arg>-artifactRepository</arg>
											<arg>file:${project.build.directory}/p2</arg>
											<arg>-bundles</arg>
											<arg>${project.build.directory}</arg>
											<arg>-compress</arg>
											<arg>-publishArtifacts</arg>
										</applicationsArgs>
									</configuration>
								</execution>
							</executions>
						</plugin>
					</plugins>
				</pluginManagement>
			</build>
		</profile>
		<profile>
			<id>verify-iplog</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.eclipse.dash</groupId>
						<artifactId>license-tool-plugin</artifactId>
						<version>0.0.1-SNAPSHOT</version>
						<executions>
							<execution>
								<id>license-check</id>
								<phase>verify</phase>
								<goals>
									<goal>license-check</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>




    Please provide an overview of the project with the following guidelines:
    - Determine the most important folders in the project, at most 10
    - Go through each important folder step-by-step:
      - Explain what each folder does in isolation by summarzing the README or package.json file, if available
      - Mention the most popular or common packages used in that folder and their roles.
    - After covering individual folders, zoom out to explain at most 5 high-level insights about the project's architecture:
      - How different parts of the codebase fit together.
      - The overall project architecture or design patterns evident from the folder structure and dependencies.
    - Provide at most 5 additional insights on the project's architecture that weren't covered in the folder-by-folder breakdown.

    Your response should be structured, clear, and focused on giving the new developer both a detailed understanding of individual components and a high-level overview of the project as a whole.

    Here is an example of a valid response:

    ## Important folders

    ### /folder1
    - Description: Contains the main application logic.
    - Key packages: Express.js for routing, Mongoose for database operations.

    #### /folder1/folder2

    ## Project Architecture
    - The frontend is built using React and Redux for state management.
    - The backend is a Node.js application using Express.js for routing and Mongoose for database operations.
    - The application follows a Model-View-Controller (MVC) architecture.

    ## Additional Insights
    - The project is using a monorepo structure.
    - The project uses TypeScript for type checking.

@fbricon
Copy link
Collaborator Author

fbricon commented Dec 10, 2024

Looks like the problem comes from this specific ignore limitation:

// First, we add a ignore pattern to ignore a directory
ig.add('config/')

// ig does NOT know if 'config', in the real world,
// is a normal file, directory or something.

ig.ignores('config')
// ig treats config as a file, so it returns false

ig.ignores('config/')
// returns true

So .git/ is added, but then ig.ignores('.git') returns false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant