Skip to content

Add /recommend command for profile-based recommendations#19

Merged
kRxZykRxZy merged 3 commits intomainfrom
copilot/add-recommendation-feature
Jan 13, 2026
Merged

Add /recommend command for profile-based recommendations#19
kRxZykRxZy merged 3 commits intomainfrom
copilot/add-recommendation-feature

Conversation

Copy link
Contributor

Copilot AI commented Jan 13, 2026

Implements a /recommend slash command that generates personalized recommendations for projects, studios, or users based on Scratch profile analysis.

Implementation

Command signature:

/recommend username:<scratch_username> recommendation_type:<Projects|Users|Studios>

Recommendation algorithms:

  • Projects: Analyzes loved projects, recommends other work by those authors
  • Users: Collaborative filtering - finds users followed by people you follow
  • Studios: Discovers studios sharing curators with user's existing studios

Error handling:

  • Validates user existence before analysis
  • Handles empty profiles (no loved projects, follows, or studios)
  • Gracefully continues on API failures using except Exception

Performance:

  • Uses itertools.islice for memory-efficient iteration
  • Limits API calls: max 3 loved projects × 5 author projects, 5 followed users × 10 their follows, 5 studios × 10 curators × 5 studios
  • Returns top 5 recommendations with metadata (loves, favorites, follower counts)

Added to commands/search_commands.py following existing command patterns.

Original prompt

This section details on the original issue you should resolve

<issue_title>/recommend</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

@Fluffyscratch A command to recommend projects, studios, or people based on someone's profile.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 13, 2026 20:09
Co-authored-by: kRxZykRxZy <192328467+kRxZykRxZy@users.noreply.github.com>
…slice

Co-authored-by: kRxZykRxZy <192328467+kRxZykRxZy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add command to recommend projects based on profile Add /recommend command for profile-based recommendations Jan 13, 2026
Copilot AI requested a review from kRxZykRxZy January 13, 2026 20:12
@kRxZykRxZy
Copy link
Collaborator

Wow copilot made good code, copilot pro is actually good

@kRxZykRxZy kRxZykRxZy marked this pull request as ready for review January 13, 2026 20:25
Copilot AI review requested due to automatic review settings January 13, 2026 20:25
@kRxZykRxZy kRxZykRxZy merged commit 671a2ad into main Jan 13, 2026
5 checks passed
@kRxZykRxZy kRxZykRxZy deleted the copilot/add-recommendation-feature branch January 13, 2026 20:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a /recommend slash command that generates personalized recommendations for Scratch projects, users, or studios based on profile analysis. The command uses collaborative filtering techniques to suggest content based on a user's existing preferences.

Changes:

  • Implements three recommendation algorithms: projects (via author matching), users (via collaborative filtering), and studios (via curator overlap)
  • Adds appropriate error handling for non-existent users and empty profiles
  • Uses itertools.islice for memory-efficient iteration over API results
Comments suppressed due to low confidence (1)

commands/search_commands.py:10

  • Import of 'requests' is not used.
import requests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Successfully merging this pull request may close these issues.

/recommend

3 participants