Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_meta_box_present is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_send_notification is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_modify_title_and_content is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_notification_custom_heading is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$onesignal_notification_custom_content is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_fonte_url is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$response_body is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$newsletter_subject is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_newsletter_subject is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$newsletter_summary is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_newsletter_summary is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
GitHub Copilot gratuito da oggi: come usarlo con Visual Studio Code

GitHub Copilot gratuito da oggi: come usarlo con Visual Studio Code

GitHub Copilot è ora gratuito per tutti con il piano Free, offrendo 2.000 completamenti di codice e 50 chat mensili. Integra funzionalità avanzate in Visual Studio Code, come Copilot Edits, istruzioni personalizzate e consapevolezza globale del progetto.

L’intelligenza artificiale generativa e i chatbot sono diventati preziosi alleati nello sviluppo software. Il passaggio successivo consiste nell’integrazione dei modelli AI all’interno degli ambienti di sviluppo (IDE, integrated development environment): in molti si sono già mossi in tal senso. Sia in Visual Studio che in Visual Studio Code erano già disponibili molteplici strumenti software per ottenere suggerimenti durante la programmazione; completamento, generazione, correzione e ottimizzazione del codice. Una delle soluzioni che per prima ha introdotto importanti innovazioni e offerto un valido aiuto agli sviluppatori, è stata GitHub Copilot.

GitHub Copilot accessibile gratis per tutti

Siamo ormai prossimi al Natale ed è tempo di regali anche per GitHub, la nota piattaforma per l’hosting di progetti software di proprietà di Microsoft.

Da oggi, infatti, l’accesso a GitHub Copilot diventa gratuito per tutti gli interessati. Lo era già per studenti, insegnanti e manutentori di software open source (che ancora oggi hanno diritto a beneficiare di Copilot Pro senza limiti). D’ora in avanti, tutti gli interessati possono approfittare del piano GitHub Copilot Free. I limiti ci sono ma potrebbero non rivelarsi così stringenti per gli sviluppatori che non sono particolarmente assidui o hanno bisogno dell’aiuto dell’intelligenza artificiale generativa soltanto per esigenze specifiche.

GitHub Copilot Free consente infatti di accedere a 2.000 completamenti di codice e a 50 messaggi di chat al mese semplicemente effettuando il login con un account personale.

Il piano Free dà comunque la possibilità di scegliere tra il modello Claude 3.5 Sonnet di Anthropic o il modello GPT-4o di OpenAI: si può porre una domanda di codifica, chiedere di spiegare il codice esistente o individuare un bug (perché il codice non funziona?) proponendo una soluzione efficace. Si può inoltre accedere agli agenti AI sviluppati da terze parti per Copilot o sviluppare in proprio un’estensione.

Come usare l’AI in Visual Studio Code

Per iniziare a usare GitHub Copilot Free, basta scaricare e installare Visual Studio Code. Si può quindi impostare un tema per l’interfaccia grafica e selezionare eventualmente l’italiano come lingua preferita premendo CTRL+MAIUSC+P, digitando display nella casella di ricerca e scegliendo Italiano.

A questo punto, cliccando sulla freccia del pulsante Copilot a destra della casella di ricerca, si deve fare clic su Use AI Features with Copilot for Free.

GitHub Copilot Free con Visual Studio Code

Con un clic sul pulsante Sign in to Use Copilot for Free, si può quindi effettuare il login usando un normale account GitHub. Se non se ne fosse ancora in possesso, è possibile registrarne uno nuovo. È indispensabile autorizzare l’accesso all’account con Visual Studio Code.

Autorizzazione accesso GitHub con Visual Studio Code

Utilizzando il riquadro in basso a destra, si può porre una domanda a Copilot, collegare il contenuto (quindi lavorare direttamente sul codice visualizzato in Visual Studio Code), attivare la chat vocale e scegliere il modello generativo preferito (Claude 3.5 Sonnet o GPT-4o).

Chiedi a Copilot con Visual Studio Code

Beneficiare dei suggerimenti di GitHub Copilot durante la scrittura del codice

Durante la stesura del codice di programmazione, GitHub Copilot si attiva di frequente per proporre codice, completare quanto si sta digitando od offrire suggerimenti pratici.

Nell’esempio in figura, la parte in grigio è proposta da Copilot Free semplicemente digitando il nome della classe. Per accettarla basta premere il tasto TAB.

Completamento e generazione codice con Copilot Free

In alcuni casi, l’assistente AI fornisce più proposte di codice: è possibile visualizzarle tutte, passando dall’una all’altra, per poi scegliere quella migliore. Copilot Free è inoltre richiamabile in qualunque momento premendo la combinazione di tasti CTRL+I.

Copilot Edits: istruzioni personalizzate e consapevolezza globale del progetto

A disposizione degli utenti del piano Free, c’è anche Copilot Edits, un’esperienza di editing multi-file accessibile dalla barra laterale della chat. Partendo da un prompt, Copilot propone modifiche a più file, inclusa la creazione di nuovi file, se necessario. Questo combina il flusso conversazionale tipico della chat con la potenza della generazione di codice di Copilot.

Il risultato è sorprendente, un’integrazione tra idee e implementazione da provare per credere. Si può ad esempio pensare di creare un’app mobile nativa utilizzando Flutter, anche senza aver usato prima d’ora Flutter.

Istruzioni personalizzate

Le custom instructions permettono di specificare esattamente come si preferisce che GitHub Copilot lavori. Queste istruzioni, incluse in ogni richiesta al modello, consentono una personalizzazione granulare a livello di editor o di progetto.

Per procedere in tal senso, basta inserire un file .github/copilot-instructions.md nel progetto per automatizzare le preferenze e fornire istruzioni pratiche alle quali il modello AI deve attenersi.

Consapevolezza globale del progetto

Copilot è dotato di esperti AI virtuali attivabili tramite l’uso del simbolo @. Servendosi, ad esempio, di @workspace, si può abilitare la comprensione dell’intero codice del progetto.

L’assistente di GitHub, inoltre, svolge automaticamente il cosiddetto rilevamento delle intenzioni, includendo automaticamente @workspace quando necessario per rispondere a domande che richiedono un contesto globale.

In definitiva, GitHub Copilot non è solo un assistente di codifica, ma un potente collaboratore progettato per adattarsi allo stile di programmazione, risolvere problemi complessi e mantenere una visione completa del progetto.

Conclusioni

L’introduzione di GitHub Copilot come strumento gratuito segna un importante passo avanti nell’evoluzione dell’intelligenza artificiale applicata allo sviluppo software. Grazie alla sua integrazione con ambienti come Visual Studio Code, Copilot rende più accessibili funzionalità avanzate di completamento, correzione e ottimizzazione del codice, abbattendo barriere economiche e tecniche per sviluppatori di ogni livello.

Le caratteristiche innovative, come le istruzioni personalizzate e la consapevolezza globale del progetto, sottolineano il potenziale di GitHub Copilot come collaboratore intelligente, capace di adattarsi alle esigenze specifiche di ogni utente.

Il rilascio di GitHub Copilot Free non solo democratizza l’accesso all’AI nel coding, ma ridefinisce il ruolo degli sviluppatori, offrendo loro strumenti che permettono di concentrarsi su creatività e innovazione, lasciando i compiti più ripetitivi all’intelligenza artificiale.

Ti consigliamo anche

Link copiato negli appunti